Author: akazakov
Date: 2007-07-04 11:47:03 -0400 (Wed, 04 Jul 2007)
New Revision: 2290
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IBijectedAttribute.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IRole.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamAnnotatedFactory.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponent.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentMethod.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextVariable.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamFactory.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaSourceReference.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPropertiesDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProperty.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamTextSourceReference.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlFactory.java
Log:
http://jira.jboss.com/jira/browse/EXIN-216 Added some comments
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,8 +11,8 @@
package org.jboss.tools.seam.core;
/**
+ * Represents Type of Bijected Attribute.
* @author Alexey Kazakov
- *
*/
public enum BijectedAttributeType {
IN,
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IBijectedAttribute.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IBijectedAttribute.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IBijectedAttribute.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,12 +11,13 @@
package org.jboss.tools.seam.core;
/**
+ * Base interface of bijected attribute of seam component.
* @author Alexey Kazakov
*/
public interface IBijectedAttribute extends ISeamContextVariable,
ISeamJavaSourceReference {
/**
- * @return type
+ * @return type of attribute
*/
public BijectedAttributeType getType();
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IRole.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IRole.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IRole.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,6 +11,7 @@
package org.jboss.tools.seam.core;
/**
+ * Represents @Role of seam component.
* @author Alexey Kazakov
*/
public interface IRole extends ISeamJavaSourceReference, ISeamContextVariable {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamAnnotatedFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamAnnotatedFactory.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamAnnotatedFactory.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,6 +11,7 @@
package org.jboss.tools.seam.core;
/**
+ * Represents seam factory method which was declared by @Factory
* @author Alexey Kazakov
*/
public interface ISeamAnnotatedFactory extends ISeamFactory, ISeamJavaSourceReference {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponent.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponent.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponent.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -14,14 +14,36 @@
import java.util.List;
import java.util.Set;
+/**
+ * Represents component in seam tools model.
+ * @author Alexey Kazakov
+ */
public interface ISeamComponent extends ISeamContextVariable {
+ /**
+ * Returns java declaration of component.
+ * This declaration represents java class of component.
+ * @return java declaration of component.
+ */
public ISeamJavaComponentDeclaration getJavaDeclaration();
+ /**
+ * Returns XML declarations of component.
+ * These declarations represent <component> elements of components.xml files.
+ * @return java declaration of component.
+ */
public Set<ISeamXmlComponentDeclaration> getXmlDeclarations();
+ /**
+ * Returns Properties declarations of component.
+ * These declarations represent properties from seam.properties file.
+ * @return
+ */
public Set<ISeamPropertiesDeclaration> getPropertiesDeclarations();
+ /**
+ * @return all declarations of component
+ */
public Set<ISeamComponentDeclaration> getAllDeclarations();
/**
@@ -30,7 +52,7 @@
public String getClassName();
/**
- * @return bijected attributes
+ * @return bijected attributes of component
*/
public Set<IBijectedAttribute> getBijectedAttributes();
@@ -75,14 +97,14 @@
public Set<ISeamComponentMethod> getMethodsByType(SeamComponentMethodType type);
/**
- * Returns properties by name from component.xml.
+ * Returns all properties from all components.xml declarations of component
* @param propertyName
* @return
*/
public Collection<ISeamProperty> getProperties();
/**
- * Returns all properties from component.xml for that component.
+ * Returns properties by name from all components.xml declarations of component
* @param propertyName
* @return
*/
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,10 +11,13 @@
package org.jboss.tools.seam.core;
/**
+ * Represents declaration of seam component.
* @author Alexey Kazakov
- *
*/
public interface ISeamComponentDeclaration extends ISeamTextSourceReference {
+ /**
+ * @return name of component.
+ */
public String getName();
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentMethod.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentMethod.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentMethod.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,6 +11,8 @@
package org.jboss.tools.seam.core;
/**
+ * Represents method of seam component.
+ * This interface represents only methods with types enumerated in
SeamComponentMethodType
* @author Alexey Kazakov
*/
public interface ISeamComponentMethod extends ISeamJavaSourceReference {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextVariable.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextVariable.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextVariable.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,12 +11,13 @@
package org.jboss.tools.seam.core;
/**
+ * Represents Seam Context Variable.
* @author Alexey Kazakov
*/
public interface ISeamContextVariable {
/**
- * @return name
+ * @return name of context variable
*/
public String getName();
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamFactory.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamFactory.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,6 +11,7 @@
package org.jboss.tools.seam.core;
/**
+ * Base interface of seam factory
* @author Alexey Kazakov
*/
public interface ISeamFactory extends ISeamContextVariable {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -13,29 +13,22 @@
import java.util.Set;
/**
+ * Represents java class of seam component.
* @author Alexey Kazakov
- *
*/
public interface ISeamJavaComponentDeclaration extends ISeamComponentDeclaration,
ISeamJavaSourceReference {
-
- public String getClassName();
/**
- * @return bijected attributes
+ * @return qualified class name
*/
- public Set<IBijectedAttribute> getBijectedAttributes();
+ public String getClassName();
/**
- * Adds bijected attribute
+ * @return all bijected attributes which are defined in that java class.
*/
- public void addBijectedAttribute(IBijectedAttribute attribute);
+ public Set<IBijectedAttribute> getBijectedAttributes();
/**
- * Removes bijected attribute
- */
- public void removeBijectedAttribute(IBijectedAttribute attribute);
-
- /**
* Returns bijected attributes by name
* @param name
* @return
@@ -50,39 +43,50 @@
public Set<IBijectedAttribute> getBijectedAttributesByType(BijectedAttributeType
type);
/**
- * @return true if component marked as Stateful
+ * Adds bijected attribute
*/
+ public void addBijectedAttribute(IBijectedAttribute attribute);
+
+ /**
+ * Removes bijected attribute
+ */
+ public void removeBijectedAttribute(IBijectedAttribute attribute);
+
+ /**
+ * @return true if class marked as Stateful
+ */
public boolean isStateful();
/**
- * @return true if component marked as Entity
+ * @return true if class marked as Entity
*/
public boolean isEntity();
/**
- * Set true if component marked as Entity
+ * Set true if class marked as Entity
*/
public void setEntity(boolean entity);
/**
- * @return roles of component
+ * @return roles of component which defined in this component class
*/
public Set<IRole> getRoles();
/**
- * Adds role to component
+ * Adds role
* @param role
*/
public void addRole(IRole role);
/**
- * Removes role from component
+ * Removes role
* @param role
*/
public void removeRole(IRole role);
/**
- * @return methods of component
+ * @return methods (see SeamComponentMethodType)
+ * which are defined in this component class.
*/
public Set<ISeamComponentMethod> getMethods();
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaSourceReference.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaSourceReference.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaSourceReference.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -13,6 +13,7 @@
import org.eclipse.jdt.core.IMember;
/**
+ * An interface of seam tools model object that has associated source object in JDT
model
* @author Alexey Kazakov
*/
public interface ISeamJavaSourceReference extends ISeamTextSourceReference {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPropertiesDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPropertiesDeclaration.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPropertiesDeclaration.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -14,40 +14,43 @@
import java.util.List;
/**
+ * Represents set of properties of seam component
+ * which were declared in one source file.
* @author Alexey Kazakov
- *
*/
public interface ISeamPropertiesDeclaration extends ISeamComponentDeclaration {
/**
- * Returns all properties from component.xml for that component.
+ * Returns property of the component within this declaration.
+ * If the declaration has a few properties with this name,
+ * then the method will return first one.
* @param propertyName
* @return
*/
- public List<ISeamProperty> getProperties(String propertyName);
+ public ISeamProperty getProperty(String propertyName);
/**
- * Returns first property with propertyName from component.xml for that component.
+ * Returns all properties of the component by name within this declaration.
* @param propertyName
* @return
*/
- public ISeamProperty getProperty(String propertyName);
+ public List<ISeamProperty> getProperties(String propertyName);
/**
- * Returns properties by name from component.xml.
+ * Returns all properties of the component within this declaration.
* @param propertyName
* @return
*/
public Collection<ISeamProperty> getProperties();
/**
- * Adds property to component.
+ * Adds property.
* @param property
*/
public void addProperty(ISeamProperty property);
/**
- * Removes property from component.
+ * Removes property.
* @param property
*/
public void removeProperty(ISeamProperty property);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProperty.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProperty.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProperty.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,22 +11,22 @@
package org.jboss.tools.seam.core;
/**
- * Property of Seam Component defined in Component.xml or Properties.xml
+ * A property of Seam Component defined in component.xml or seam.properties files
*/
public interface ISeamProperty extends ISeamTextSourceReference {
/**
- * @return name of property
+ * @return name of this property
*/
public String getName();
/**
- * @return value of property
+ * @return value of this property
*/
public Object getValue();
/**
- * Sets value of property
+ * Sets value of this property
* @param value
*/
public void setValue(Object value);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamTextSourceReference.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamTextSourceReference.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamTextSourceReference.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -13,11 +13,23 @@
import org.eclipse.core.resources.IResource;
/**
+ * An interface of seam tools model object that has text source.
* @author Alexey Kazakov
*/
public interface ISeamTextSourceReference {
+ /**
+ * @return resource
+ */
public IResource getResource();
+
+ /**
+ * @return start position of element in text
+ */
public int getStartPosition();
+
+ /**
+ * @return number of characters of element in text
+ */
public int getLength();
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlComponentDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlComponentDeclaration.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlComponentDeclaration.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,33 +11,64 @@
package org.jboss.tools.seam.core;
/**
+ * Represents <component> element of components.xml file.
* @author Alexey Kazakov
- *
*/
public interface ISeamXmlComponentDeclaration extends ISeamPropertiesDeclaration {
- public String NAME = "name";
- public String CLASS = "class";
- public String SCOPE = "scope";
- public String PRECEDENCE = "precedence";
- public String INSTALLED = "installed";
- public String AUTO_CREATE = "auto-create";
- public String JNDI_NAME = "jndi-name";
+ /*
+ * Names of <component> attributes.
+ */
+ public final static String NAME = "name";
+ public final static String CLASS = "class";
+ public final static String SCOPE = "scope";
+ public final static String PRECEDENCE = "precedence";
+ public final static String INSTALLED = "installed";
+ public final static String AUTO_CREATE = "auto-create";
+ public final static String JNDI_NAME = "jndi-name";
+
+ /**
+ * @return scope type
+ */
public ScopeType getScope();
+ /**
+ * @return string value of 'scope' attribute
+ */
public String getScopeAsString();
+ /**
+ * @return string value of 'class' attribute
+ */
public String getClassName();
+ /**
+ * @return string value of 'jndi-name' attribute
+ */
public String getJndiName();
+ /**
+ * @return true if attribute 'installed' is 'true'
+ */
public boolean isInstalled();
-
+
+ /**
+ * @return string value of 'installed' attribute
+ */
public boolean getInstalledAsString();
+ /**
+ * @return string value of 'precedence' attribute
+ */
public String getPrecedence();
+ /**
+ * @return true if attribute 'auto-create' is 'true'
+ */
public boolean isAutoCreate();
+ /**
+ * @return string value of 'auto-create' attribute
+ */
public String getAutoCreateAsString();
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlFactory.java 2007-07-04
15:16:10 UTC (rev 2289)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlFactory.java 2007-07-04
15:47:03 UTC (rev 2290)
@@ -11,12 +11,13 @@
package org.jboss.tools.seam.core;
/**
+ * Represents <factory> element in components.xml
* @author Alexey Kazakov
*/
public interface ISeamXmlFactory extends ISeamFactory, ISeamTextSourceReference {
/**
- * @return value
+ * @return string value of 'value' attribute
*/
public String getValue();
@@ -27,7 +28,7 @@
public void setValue(String value);
/**
- * @return method
+ * @return string value of 'method' attribute
*/
public String getMethod();