beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremiah Johnson (JIRA)" <...@beehive.apache.org>
Subject [jira] Commented: (BEEHIVE-922) group of doc issues in Controls Programming document
Date Mon, 12 Sep 2005 20:26:30 GMT
    [ http://issues.apache.org/jira/browse/BEEHIVE-922?page=comments#action_12323280 ] 

Jeremiah Johnson commented on BEEHIVE-922:
------------------------------------------

Most of the properties examples have issues.  I believe that many people will look at the
examples and play with them before reading the full document, so I think that these issues
should be fixed.

Properties example is Section 10.1 should be changed so it will compile.

--- current example
@PropertySet( prefix="Destination" )
@Target( { FIELD, TYPE } )
@Retention( RetentionPolicy.RUNTIME )
public @interface Destination {
    public DestinationType type() default DestinationType.QUEUE;
    public String name();
}
--- should be changed to
@PropertySet( prefix="Destination" )
@Target( { ElementType.FIELD, ElementType.TYPE } )
@Retention( RetentionPolicy.RUNTIME )
public @interface Destination {
    public DestinationType type() default DestinationType.QUEUE;
    public String name();
}
---

Related to the definition of the properties, the clip in Section 10.2 that uses the properties
is wrong.

--- current example
jmsBean.setDestinationType( Destination.QUEUE );
--- should be changed to
jmsBean.setDestinationType( DestinationType.QUEUE );
---

I think that leaving that example as it would misrepresent the relationship of the enum and
property, so I definitely think that it should be changed.

Section 10.3 uses some life-cycle events to demonstrate getting a property value.  Life-cycle
events aren't introduce until Section 14 and the example, as it is, won't compile because
of import issues.  I think that more clear example, at this point, would be to put the property
query into the method already defined in the JmsMessageControlImpl.  Possibly take the clip
from Section 9.2 and replace the ServletContext stuff with this:
---
Destination destinationProperty = (Destination) context.getControlPropertySet( Hello.Destination.class
);
if( destinationProperty == null ) {
    System.out.println( "Dest Property NOT Set" );
} else {
    System.out.println( "Dest Property Set" );
}
---

Add a line-break to the examples in Section 10.5 in the lines using @AnnotationConstraints
because the PDF (in AcroRead on Windows) is unreadable on those lines.  Also, show the imports
in those examples like the other examples in the document so that people learning from the
examples will be able to code stuff up quickly.

--- current text
@AnnotationConstraints.MembershipRule(AnnotationConstraints.MembershipRuleValues.EXACTLY_ONE)
--- should change to
@AnnotationConstraints.MembershipRule(
    AnnotationConstraints.MembershipRuleValues.EXACTLY_ONE)
---

I'd like to see the client code in Section 10.5 change so it will clearly demonstrate the
violation of the appropriate rule.  As it is, the max length rule of title, the max length
rule of subject, and the exactly one rule are all violated, but the text only talks about
the exactly one rule.

--- current example
@BookControl.Intro( title="some title", subject="some subject" )
--- should change to
@BookControl.Intro( title="title", subject="subject" )
---

> group of doc issues in Controls Programming document
> ----------------------------------------------------
>
>          Key: BEEHIVE-922
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-922
>      Project: Beehive
>         Type: Bug
>   Components: Documentation
>     Versions: V1
>  Environment: dist built from SVN r280352
>     Reporter: Jeremiah Johnson
>     Assignee: Jeremiah Johnson
>     Priority: Minor
>      Fix For: V1

>
> There are a few errors in trunk/docs/forrest/release/src/documentation/context/xdocs/controls/programming.xml
> If this issue is assigned to me, please don't fix the document yet - I haven't finished
going through it.  I decided to create this bug so I could add issues from the document as
they came up.  I had created BEEHIVE-917 with a specific scope, but I see now that there are
a few unrelated issues in the document so I'm creating this new bug to track everything I
find (that is outside the scope of BEEHIVE-917).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message