Initial commit from SVN.
This commit is contained in:
8
Foundation View Builder/.classpath
Normal file
8
Foundation View Builder/.classpath
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="/Common"/>
|
||||
<classpathentry kind="src" path="/Foundation"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
23
Foundation View Builder/.project
Normal file
23
Foundation View Builder/.project
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Foundation View Builder</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>Common</project>
|
||||
<project>Foundation</project>
|
||||
<project>Foundation SWT</project>
|
||||
<project>SWT</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2004,2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.application;
|
||||
|
||||
import com.foundation.application.Application;
|
||||
|
||||
/**
|
||||
* This is just a place holder for the real application instance. The real application should set the singleton defined here.
|
||||
*/
|
||||
public abstract class BuilderApplication extends Application {
|
||||
private static IBuilderApplication singleton = null;
|
||||
/**
|
||||
* BuilderApplication constructor.
|
||||
*/
|
||||
private BuilderApplication() {
|
||||
super();
|
||||
}//BuilderApplication()//
|
||||
/**
|
||||
* Gets the one and only builder application instance.
|
||||
* @return The builder application.
|
||||
*/
|
||||
public static IBuilderApplication getSingleton() {
|
||||
return singleton;
|
||||
}//getSingleton()//
|
||||
/**
|
||||
* Sets the one and only builder application instance.
|
||||
* Note that this is not a thread safe call and should be called inside the real application classes' static initializer.
|
||||
* @param singleton The one and only instance of the builder application.
|
||||
*/
|
||||
public static void setSingleton(IBuilderApplication _singleton) {
|
||||
if(singleton == null) {
|
||||
singleton = _singleton;
|
||||
}//if//
|
||||
}//setSingleton()//
|
||||
}//BuilderApplication//
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2004,2009 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.application;
|
||||
|
||||
public interface IBuilderApplication extends com.foundation.application.IApplication {
|
||||
}//IBuilderApplication//
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.builder;
|
||||
|
||||
/**
|
||||
* This exception should be used in conjunction with the feedback stack to report warnings, information, and errors.
|
||||
* If a fatal error was placed on the feeback stack and the build must exit immediately, then this exception should be thrown.
|
||||
*/
|
||||
public class BuildFailedException extends RuntimeException {
|
||||
/**
|
||||
* BuildFailedException constructor.
|
||||
*/
|
||||
public BuildFailedException() {
|
||||
}//BuildFailedException()//
|
||||
}//BuildFailedException//
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright (c) 2003,2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.builder;
|
||||
|
||||
import com.foundation.util.xml.INode;
|
||||
import com.foundation.view.definition.IComponentData;
|
||||
import com.foundation.view.definition.IViewModel;
|
||||
|
||||
/**
|
||||
* Defines a builder used to build source for a specific class of component.
|
||||
*/
|
||||
public interface IBuilder {
|
||||
/**
|
||||
* Appends code to create the component variable(s) and add any initialization source that subclasses wouldn't want to include.
|
||||
* Only non-abstract components should implement this method and implementors will generally not call the super classes' implementation.
|
||||
* <p>Important: Implementors must call appendInitializationBody(...) before ending this method so that all the necessary source can be written.</p>
|
||||
* @param viewBuilder The view builder controlling the build process.
|
||||
* @param buffer The buffer to append the source code to.
|
||||
* @param componentData The component data which is specific to the support class.
|
||||
*/
|
||||
public void appendInitializationHead(IViewSourceBuilder viewBuilder, StringBuffer buffer, IComponentData componentData);
|
||||
/**
|
||||
* Appends source to initialize the component. This includes any source that subclasses would likely want included.
|
||||
* This method is called after the appendInitializationHead(...) method and it generally calls the super classes' implementation at some point.
|
||||
* @param viewBuilder The view builder controlling the build process.
|
||||
* @param buffer The buffer to append the source code to.
|
||||
* @param componentData The component data which is specific to the support class.
|
||||
* @param variableName The name of the component's variable in the source.
|
||||
*/
|
||||
public void appendInitializationBody(IViewSourceBuilder viewBuilder, StringBuffer buffer, IComponentData componentData, String variableName);
|
||||
/**
|
||||
* Appends the constructor parameter code for the passed component data.
|
||||
* @param viewBuilder The view builder controlling the build process.
|
||||
* @param buffer The buffer to append the source code to.
|
||||
* @param componentData The component data which is specific to the support class.
|
||||
* @param parentVariable The variable name for the component's parent.
|
||||
*/
|
||||
public void appendComponentConstructorParameters(IViewSourceBuilder viewBuilder, StringBuffer buffer, IComponentData componentData, String parentVariable);
|
||||
/**
|
||||
* Appends the constructor parameter code for the passed component data.
|
||||
* @param viewBuilder The view builder controlling the build process.
|
||||
* @param buffer The buffer to append the source code to.
|
||||
* @param componentData The component data which is specific to the support class.
|
||||
* @param parentVariable The variable name for the component's parent.
|
||||
* @param controlIdentifier The control's identifier.
|
||||
*/
|
||||
public void appendComponentConstructorParameters(IViewSourceBuilder viewBuilder, StringBuffer buffer, IComponentData componentData, String parentVariable, String controlIdentifier);
|
||||
/**
|
||||
* Appends the linkage source code to the setupLinks method in the view source.
|
||||
* This is called by the view builder after all the component initialize methods are called so that the linkages can access the component variables.
|
||||
* @param viewBuilder The view builder controlling the build process.
|
||||
* @param buffer The buffer to append the source code to.
|
||||
* @param componentData The component data which is specific to the support class.
|
||||
* @param variableName The name of the component's variable in the source.
|
||||
*/
|
||||
public void appendLinks(IViewSourceBuilder viewBuilder, StringBuffer buffer, IComponentData componentData, String variableName);
|
||||
/**
|
||||
* Builds the constructor source for the view class. Only builders that represent components which can be root level for a view must implement this method.
|
||||
* @param viewBuilder The view builder controlling the build process.
|
||||
* @param constructor The buffer to contain the constructor source code.
|
||||
* @param className The name of the class being built.
|
||||
* @param componentData The component data which is specific to the support class.
|
||||
*/
|
||||
public void buildConstructors(IViewSourceBuilder viewBuilder, StringBuffer constructor, String className, IComponentData componentData);
|
||||
/**
|
||||
* Gets the link target identifier usable in the source code for the given link target name as defined by the component's cml.
|
||||
* @param linkTargetName The cml name for the link-target.
|
||||
* @return The identifier defined by the component for the link-target name.
|
||||
*/
|
||||
public String getLinkTargetIdentifier(String linkTargetName);
|
||||
/**
|
||||
* Gets the qualified class name of the component being supported.
|
||||
* @return The fully qualified name of the supported component class allowing the view builder to cast and create required attributes.
|
||||
*/
|
||||
public String getComponentClassName();
|
||||
/**
|
||||
* Gets the name of the method used to initialize the view.
|
||||
* This may be different for each platform, or for the component type that is the primary component.
|
||||
* @return The name of the generated method containing the view initialization source.
|
||||
*/
|
||||
public String getPrimaryInitializationMethodName();
|
||||
/**
|
||||
* Determines whether the component should be packed after being initialized.
|
||||
* @param componentData The component data which is specific to the support class.
|
||||
* @return Whether the component requires packing.
|
||||
*/
|
||||
public boolean shouldPack(IComponentData componentData);
|
||||
/**
|
||||
* Updates the data and structure of the given component.
|
||||
* @param viewModel The view model that is loading the view data.
|
||||
* @param node The node that defines the base component.
|
||||
* @return Whether the node required updating and was modified.
|
||||
*/
|
||||
public boolean updateComponent(IViewModel viewModel, INode node);
|
||||
}//ICodeSupport//
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.builder;
|
||||
|
||||
import com.common.util.IList;
|
||||
import com.foundation.util.xml.IElement;
|
||||
|
||||
public interface IClassMetadataLoader {
|
||||
/**
|
||||
* Locates the metadata for the method in either the defining type of one of the classes or interfaces it inherits from, and retrieves the result type.
|
||||
* @param definingType The class to start the search from. This class's super classes and interfaces will be recursively searched until a signature match is found.
|
||||
* @param methodName The name of the method.
|
||||
* @param methodSignature The signature of the method. This must be in class file format or it may be null if the method has no parameters.
|
||||
* @param feedbackStack The optional stack of feedback Message instances to use when generating errors and warnings.
|
||||
* @param debugElement The optional document element used to identify exactly where in the VML source the error occured.
|
||||
* @return The result class name. This will be in java source format (eg: java.lang.Object[] or int[][]). The result will never be null.
|
||||
*/
|
||||
public String getMethodReturnType(String definingType, String methodName, String methodSignature, IList feedbackStack, IElement debugElement) throws ClassNotFoundException;
|
||||
}//IClassMetadataLoader//
|
||||
@@ -0,0 +1,302 @@
|
||||
/*
|
||||
* Copyright (c) 2003,2009 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.builder;
|
||||
|
||||
import com.common.util.IList;
|
||||
import com.foundation.util.xml.IElement;
|
||||
import com.foundation.view.definition.*;
|
||||
|
||||
/**
|
||||
* Defines the view source code builder methods.
|
||||
*/
|
||||
public interface IViewSourceBuilder {
|
||||
public static final String COMMON_PROPERTY_NAME = "name";
|
||||
public static final String VALUE_HOLDER_PROPERTY_TYPE = "type";
|
||||
|
||||
public static final String COMMON_TYPE_NAME_VALUE_HOLDER = "value-holder";
|
||||
public static final String COMMON_TYPE_NAME_LAYOUT = "layout";
|
||||
public static final String COMMON_TYPE_NAME_LAYOUT_DATA = "layout-data";
|
||||
|
||||
public static final byte ACCESS_TYPE_BOTH = 0;
|
||||
public static final byte ACCESS_TYPE_SET_ONLY = 1;
|
||||
public static final byte ACCESS_TYPE_GET_ONLY = 2;
|
||||
|
||||
public static final String MODIFIER_ALT = "alt";
|
||||
public static final String MODIFIER_SHIFT = "shift";
|
||||
public static final String MODIFIER_CTRL = "ctrl";
|
||||
public static final String MODIFIER_CONTROL = "control";
|
||||
public static final String MODIFIER_COMMAND = "command";
|
||||
public static final String MODIFIER_MODIFIER_1 = "mod1";
|
||||
public static final String MODIFIER_MODIFIER_2 = "mod2";
|
||||
public static final String MODIFIER_MODIFIER_3 = "mod3";
|
||||
public static final String MODIFIER_MODIFIER_4 = "mod4";
|
||||
|
||||
public static final String ACCELERATOR_KEY_BACK_SPACE = "backspace";
|
||||
public static final String ACCELERATOR_KEY_CARRIAGE_RETURN = "return";
|
||||
public static final String ACCELERATOR_KEY_DELETE = "delete";
|
||||
public static final String ACCELERATOR_KEY_ESCAPE = "escape";
|
||||
public static final String ACCELERATOR_KEY_LINE_FEED = "linefeed";
|
||||
public static final String ACCELERATOR_KEY_TAB = "tab";
|
||||
public static final String ACCELERATOR_KEY_ARROW_UP = "up";
|
||||
public static final String ACCELERATOR_KEY_ARROW_DOWN = "down";
|
||||
public static final String ACCELERATOR_KEY_ARROW_LEFT = "left";
|
||||
public static final String ACCELERATOR_KEY_ARROW_RIGHT = "right";
|
||||
public static final String ACCELERATOR_KEY_PAGE_UP = "pageup";
|
||||
public static final String ACCELERATOR_KEY_PAGE_DOWN = "pagedown";
|
||||
public static final String ACCELERATOR_KEY_HOME = "home";
|
||||
public static final String ACCELERATOR_KEY_END = "end";
|
||||
public static final String ACCELERATOR_KEY_INSERT = "insert";
|
||||
public static final String ACCELERATOR_KEY_F1 = "f1";
|
||||
public static final String ACCELERATOR_KEY_F2 = "f2";
|
||||
public static final String ACCELERATOR_KEY_F3 = "f3";
|
||||
public static final String ACCELERATOR_KEY_F4 = "f4";
|
||||
public static final String ACCELERATOR_KEY_F5 = "f5";
|
||||
public static final String ACCELERATOR_KEY_F6 = "f6";
|
||||
public static final String ACCELERATOR_KEY_F7 = "f7";
|
||||
public static final String ACCELERATOR_KEY_F8 = "f8";
|
||||
public static final String ACCELERATOR_KEY_F9 = "f9";
|
||||
public static final String ACCELERATOR_KEY_F10 = "f10";
|
||||
public static final String ACCELERATOR_KEY_F11 = "f11";
|
||||
public static final String ACCELERATOR_KEY_F12 = "f12";
|
||||
|
||||
public static final int TYPE_NUMBER_STRING = 0;
|
||||
public static final int TYPE_NUMBER_BOOLEAN = 1;
|
||||
public static final int TYPE_NUMBER_BYTE = 2;
|
||||
public static final int TYPE_NUMBER_SHORT = 3;
|
||||
public static final int TYPE_NUMBER_INTEGER = 4;
|
||||
public static final int TYPE_NUMBER_LONG = 5;
|
||||
public static final int TYPE_NUMBER_FLOAT = 6;
|
||||
public static final int TYPE_NUMBER_DOUBLE = 7;
|
||||
public static final int TYPE_NUMBER_DATE = 8;
|
||||
public static final int TYPE_NUMBER_BIG_DECIMAL = 9;
|
||||
public static final Integer TYPE_STRING = new Integer(TYPE_NUMBER_STRING);
|
||||
public static final Integer TYPE_BOOLEAN = new Integer(TYPE_NUMBER_BOOLEAN);
|
||||
public static final Integer TYPE_BYTE = new Integer(TYPE_NUMBER_BYTE);
|
||||
public static final Integer TYPE_SHORT = new Integer(TYPE_NUMBER_SHORT);
|
||||
public static final Integer TYPE_INTEGER = new Integer(TYPE_NUMBER_INTEGER);
|
||||
public static final Integer TYPE_LONG = new Integer(TYPE_NUMBER_LONG);
|
||||
public static final Integer TYPE_FLOAT = new Integer(TYPE_NUMBER_FLOAT);
|
||||
public static final Integer TYPE_DOUBLE = new Integer(TYPE_NUMBER_DOUBLE);
|
||||
public static final Integer TYPE_DATE = new Integer(TYPE_NUMBER_DATE);
|
||||
public static final Integer TYPE_BIG_DECIMAL = new Integer(TYPE_NUMBER_BIG_DECIMAL);
|
||||
|
||||
/**
|
||||
* Creates and adds an attribute association identifier to the class.
|
||||
* @param element The element in the view definition that corresponds to the identifier being created. This allows for better debugging.
|
||||
* @param componentName The name of the component defining the attribute association.
|
||||
* @param useageName The unique (within the component) name of the attribute's usage.
|
||||
* @return The identifier name which can be placed in the code to reference the attribute association.
|
||||
*/
|
||||
public String addAttributeAssociationIdentifier(IElement element, String componentName, String useageName);
|
||||
/**
|
||||
* Adds a view attribute for a view component using the component name as the attribute name.
|
||||
* @param componentData The component data used to get the component name.
|
||||
* @param builder The builder for the component necessary to get the component's class name.
|
||||
*/
|
||||
public void addComponentAttribute(IComponentData componentData, IBuilder builder);
|
||||
/**
|
||||
* Adds an attribute to the generated source code.
|
||||
* @param typeName The qualified class name for the attribute.
|
||||
* @param attributeName The attribute's name.
|
||||
*/
|
||||
public void addAttribute(String typeName, String attributeName);
|
||||
/**
|
||||
* Creates and adds a component name identifier to the class.
|
||||
* @param element The element in the view definition that corresponds to the identifier being created. This allows for better debugging.
|
||||
* @param componentName The name of the component defining the component name.
|
||||
* @return The identifier name which can be placed in the code to reference the component name.
|
||||
*/
|
||||
public String addComponentNameIdentifier(IElement element, String componentName);
|
||||
/**
|
||||
* Creates and adds a public identifier to the class.
|
||||
* @param element The element in the view definition that corresponds to the identifier being created. This allows for better debugging.
|
||||
* @param name The identifier name. This can be in mixed case and can mix underscores with variable style naming convensions. The name will be 'fixed' so that it is all in upper case with underscores.
|
||||
* @param value The identifier value. This can currently only be an Integer or a String.
|
||||
* @param isPrimitive Whether the identifier value is supposed to be primitive.
|
||||
* @return The identifier name which can be placed in the code to reference the identifier.
|
||||
*/
|
||||
public String addPublicIdentifier(IElement element, String name, Object value, boolean isPrimitive);
|
||||
/**
|
||||
* Adds a key binding identifier to the source output.
|
||||
* @param part The key part requesting the identifier.
|
||||
* @param componentName The component's name.
|
||||
* @param useageName The usage name which includes junk to make it unique within the usage context. This may be null.
|
||||
* @return The identifier that can be used.
|
||||
*/
|
||||
public String addKeyBindingIdentifier(IKeyPart part, String componentName, String useageName);
|
||||
/**
|
||||
* Adds the direct attribute handler case statements to the collection of such handlers.
|
||||
* @param component The component adding the attribute association.
|
||||
* @param attributeIdentifier The attribute reference's identifier.
|
||||
* @param attributeReference The attribute related information.
|
||||
* @param defaultAttributeType The qualified class name the control will assume for the attribute if no other is specified.
|
||||
* @param accessType An identifier indicating whether the attribute is set only, get only, or both.
|
||||
*/
|
||||
public void addDirectAttributeHandler(IComponentData component, String attributeIdentifier, IAttributePart attributeReference, String defaultAttributeType, byte accessType);
|
||||
/**
|
||||
* Adds the direct method handler case statements to the collection of such handlers.
|
||||
* @param component The component adding the method reference.
|
||||
* @param methodIdentifier The method reference's identifier.
|
||||
* @param methodReference The method reference.
|
||||
*/
|
||||
public void addDirectMethodHandler(IComponentData component, String methodIdentifier, IMethodPart methodReference);
|
||||
/**
|
||||
* Adds the direct key handler case statements to the collection of such handlers.
|
||||
* @param component The component adding the key.
|
||||
* @param identifier The key's identifier.
|
||||
* @param part The part requiring the handler.
|
||||
*/
|
||||
public void addDirectKeyHandler(IComponentData component, String identifier, IKeyPart part);
|
||||
/**
|
||||
* Adds a method to the view to initialize a view component.
|
||||
* @param component The component to be initialized by the method.
|
||||
* @return The method name so that the containing component's initialization code can call it.
|
||||
*/
|
||||
public String addInitializeComponentMethod(IComponentData component);
|
||||
/**
|
||||
* Adds a method to the view to initialize a view component.
|
||||
* @param component The component to be initialized by the method.
|
||||
* @param parameterTypeName The type name for the initialize method's parameter.
|
||||
* @return The method name so that the containing component's initialization code can call it.
|
||||
*/
|
||||
public String addInitializeComponentMethod(IComponentData component, String parameterTypeName);
|
||||
/**
|
||||
* Adds a method to the view to initialize a menu.
|
||||
* @param component The component that contains the menu.
|
||||
* @param menu The menu to be initialized by the method.
|
||||
* @param menuPartName The text that best describes the menu's function. Most often this should be "MenuBar" or "PopupMenu".
|
||||
* @return The method name so that the containing component's initialization code can call it.
|
||||
*/
|
||||
public String addInitializeMenuMethod(IComponentData component, IComponentData menu, String menuPartName);
|
||||
/**
|
||||
* Creates and adds an method association identifier to the class.
|
||||
* @param element The element in the view definition that corresponds to the identifier being created. This allows for better debugging.
|
||||
* @param componentName The name of the component defining the method association.
|
||||
* @param useageName The unique (within the component) name of the method's usage.
|
||||
* @return The identifier name which can be placed in the code to reference the method association.
|
||||
*/
|
||||
public String addMethodAssociationIdentifier(IElement element, String componentName, String useageName);
|
||||
/**
|
||||
* Appends the link source for a specific link.
|
||||
* @param component The component creating the link.
|
||||
* @param buffer The buffer for the source.
|
||||
* @param part The link metadata.
|
||||
*/
|
||||
public void appendLink(IComponentData component, StringBuffer buffer, ILinkPart part);
|
||||
/**
|
||||
* Appends the source code for the collecting association (the source does not end with a semi-colon).
|
||||
* @param component The component adding the association.
|
||||
* @param buffer The code buffer to append to.
|
||||
* @param componentName The variable name of the component using the association.
|
||||
* @param parts The collection of IAssociationPart instances containing the data.
|
||||
* @param identifierUseageName The unique (within the component) name of the attribute's usage.
|
||||
* @param accessType An identifier indicating whether the association is set only, get only, or both. If the association has children (is chained) then only the leaf child will have this access type, the rest will be Get Only.
|
||||
*/
|
||||
public void appendCollectingAssociation(IComponentData component, StringBuffer buffer, String componentName, IList parts, String identifierUsageName, byte accessType);
|
||||
/**
|
||||
* Appends the source code for the association (the source does not end with a semi-colon).
|
||||
* @param component The component adding the association.
|
||||
* @param buffer The code buffer to append to.
|
||||
* @param componentName The variable name of the component using the association.
|
||||
* @param part The association part containing the association data.
|
||||
* @param identifierUseageName The unique (within the component) name of the attribute's usage.
|
||||
* @param accessType An identifier indicating whether the association is set only, get only, or both. If the association has children (is chained) then only the leaf child will have this access type, the rest will be Get Only.
|
||||
*/
|
||||
public void appendAssociation(IComponentData component, StringBuffer buffer, String componentName, IAssociationGroupPart part, String identifierUsageName, byte accessType);
|
||||
/**
|
||||
* Appends code to create an attribute association.
|
||||
* @param buffer The code buffer to append to.
|
||||
* @param componentName The variable name of the component using the association.
|
||||
* @param part The attribute part containing the association data.
|
||||
* @param associationIdentifier The identifier for the attribute.
|
||||
*/
|
||||
public void appendAttributeAssociation(StringBuffer buffer, String componentName, IAttributePart part, String associationIdentifier);
|
||||
/**
|
||||
* Appends code to create a key binding.
|
||||
* @param buffer The code buffer to append to.
|
||||
* @param componentName The variable name of the component using the key binding.
|
||||
* @param part The key part containing the data.
|
||||
* @param bindingIdentifier The identifier for the key binding.
|
||||
*/
|
||||
public void appendKeyBinding(StringBuffer buffer, String componentName, IKeyPart part, String bindingIdentifier);
|
||||
/**
|
||||
* Appends code to create an event association.
|
||||
* @param buffer The code buffer to append to.
|
||||
* @param componentName The variable name of the component using the association.
|
||||
* @param part The event part containing the association data.
|
||||
*/
|
||||
public void appendEventAssociation(StringBuffer buffer, String componentName, IEventPart part);
|
||||
/**
|
||||
* Appends code to create an event association.
|
||||
* @param buffer The code buffer to append to.
|
||||
* @param componentName The variable name of the component using the association.
|
||||
* @param part The attribute part containing the association data.
|
||||
*/
|
||||
public void appendEventAssociation(StringBuffer buffer, String componentName, IAttributePart part);
|
||||
/**
|
||||
* Appends layout code to the container's initialization method.
|
||||
* @param buffer The code buffer for the container's initialization method.
|
||||
* @param container The container whose layout will be written to the source.
|
||||
*/
|
||||
public void appendLayout(StringBuffer buffer, IComponentData container);
|
||||
/**
|
||||
* Appends code to create an method association.
|
||||
* @param buffer The code buffer to append to.
|
||||
* @param componentName The variable name of the component using the association.
|
||||
* @param methodReference The method reference containing the association data.
|
||||
* @param associationIdentifier The identifier for the method.
|
||||
*/
|
||||
public void appendMethodAssociation(StringBuffer buffer, String componentName, IMethodPart methodReference, String associationIdentifier);
|
||||
/**
|
||||
* Gets the stack of com.foundation.view.definition.Message instances.
|
||||
* @return The stack upon which error and information reporting can be placed.
|
||||
*/
|
||||
public IList getFeedbackStack();
|
||||
/**
|
||||
* Gets a new builder for the associated component data.
|
||||
* @param componentData The component data whose source builder is required.
|
||||
* @return A new builder of the type specified by the component data's type given the target platform specified when creating this view builder.
|
||||
*/
|
||||
public IBuilder getBuilder(IComponentData componentData);
|
||||
/**
|
||||
* Gets the view defined name for the given component.
|
||||
* @param component The component whose name is to be retreived.
|
||||
* @return The name of the given component.
|
||||
*/
|
||||
public String getComponentName(IComponentData component);
|
||||
/**
|
||||
* Gets the view's attribute name for the given component.
|
||||
* @param componentData The component whose attribute is to be retrieved.
|
||||
* @return The view's attribute name for the given component.
|
||||
*/
|
||||
public String getComponentAttributeName(IComponentData component);
|
||||
/**
|
||||
* Gets the primary component for the view. The view name is the primary component's name.
|
||||
* @return The view's primary component.
|
||||
*/
|
||||
public IComponentData getPrimaryComponent();
|
||||
/**
|
||||
* A utility method which parses the type name and returns an integer representing the type.
|
||||
* @param typeName The name of the type.
|
||||
* @return The number representing the type, or null if unknown. The number identifiers are defined by IViewSourceBuilder and begin with TYPE_* and TYPE_NUMBER_*.
|
||||
* @see IViewSourceBuilder
|
||||
*/
|
||||
public Integer parseType(String typeName);
|
||||
/**
|
||||
* Gets the attribute name formatted as an identifier defined by the class declaring the attribute.
|
||||
* @param name The attribute name or identifier to be formatted. If an identifier then nothing should be changed.
|
||||
* @return The attribute identifier name following either the identifier, or attribute formatting standards (and some illegal variations).
|
||||
*/
|
||||
public String formatIdentifier(String name);
|
||||
/**
|
||||
* Gets the attribute identifier or name formatted as a Java attribute name.
|
||||
* @param name The name or identifier for an attribute.
|
||||
* @return The attribute name formatted either as a Java attribute, or as an identifier (or some illegal variations that can still be understood).
|
||||
*/
|
||||
public String formatName(String name);
|
||||
}//IViewSourceBuilder//
|
||||
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Copyright (c) 2003,2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.builder;
|
||||
|
||||
import com.foundation.util.xml.IElement;
|
||||
|
||||
public class ViewBuilderException extends RuntimeException {
|
||||
private int lineNumber = -1;
|
||||
private int characterStart = -1;
|
||||
private int characterEnd = -1;
|
||||
/**
|
||||
* ViewBuilderException constructor.
|
||||
* <p>Exists to allow for easy serialization only. Do not call this constructor under normal circumstances.</p>
|
||||
*/
|
||||
public ViewBuilderException() {
|
||||
super();
|
||||
}//ViewBuilderException()//
|
||||
/**
|
||||
* ViewBuilderException constructor.
|
||||
* @param message The message to be displayed to the user.
|
||||
* @param lineNumber The one based line number from the beginning of the file. This may be <= 0 if unkown.
|
||||
* @param characterStart The first (zero based) character index from the start of the line. This may be < 0 if unkown.
|
||||
* @param characterEnd The last (zero based) character index from the start of the line. This may be < 0 if unkown.
|
||||
*/
|
||||
public ViewBuilderException(String message, int lineNumber, int characterStart, int characterEnd) {
|
||||
super(message);
|
||||
this.lineNumber = lineNumber;
|
||||
this.characterStart = characterStart;
|
||||
this.characterEnd = characterEnd;
|
||||
}//ViewBuilderException()//
|
||||
/**
|
||||
* ViewBuilderException constructor.
|
||||
* <p>The message will come from the causing exception's message attribute.</p>
|
||||
* @param cause The causing exception.
|
||||
* @param lineNumber The one based line number from the beginning of the file. This may be <= 0 if unkown.
|
||||
* @param characterStart The first (zero based) character index from the start of the line. This may be < 0 if unkown.
|
||||
* @param characterEnd The last (zero based) character index from the start of the line. This may be < 0 if unkown.
|
||||
*/
|
||||
public ViewBuilderException(Throwable cause, int lineNumber, int characterStart, int characterEnd) {
|
||||
super(cause);
|
||||
this.lineNumber = lineNumber;
|
||||
this.characterStart = characterStart;
|
||||
this.characterEnd = characterEnd;
|
||||
}//ViewBuilderException()//
|
||||
/**
|
||||
* ViewBuilderException constructor.
|
||||
* @param message The message to be displayed to the user.
|
||||
* @param cause The causing exception.
|
||||
* @param lineNumber The one based line number from the beginning of the file. This may be <= 0 if unkown.
|
||||
* @param characterStart The first (zero based) character index from the start of the line. This may be < 0 if unkown.
|
||||
* @param characterEnd The last (zero based) character index from the start of the line. This may be < 0 if unkown.
|
||||
*/
|
||||
public ViewBuilderException(String message, Throwable cause, int lineNumber, int characterStart, int characterEnd) {
|
||||
super(message, cause);
|
||||
this.lineNumber = lineNumber;
|
||||
this.characterStart = characterStart;
|
||||
this.characterEnd = characterEnd;
|
||||
}//ViewBuilderException()//
|
||||
/**
|
||||
* ViewBuilderException constructor.
|
||||
* @param message The message to be displayed to the user.
|
||||
* @param element The xml element that is causing the exception.
|
||||
*/
|
||||
public ViewBuilderException(String message, IElement element) {
|
||||
super(message);
|
||||
|
||||
if(element != null) {
|
||||
this.lineNumber = element.getEndLine();
|
||||
this.characterStart = element.getStartCharacter();
|
||||
this.characterEnd = element.getEndCharacter();
|
||||
}//if//
|
||||
}//ViewBuilderException()//
|
||||
/**
|
||||
* ViewBuilderException constructor.
|
||||
* <p>The message will come from the causing exception's message attribute.</p>
|
||||
* @param cause The causing exception.
|
||||
* @param element The xml element that is causing the exception.
|
||||
*/
|
||||
public ViewBuilderException(Throwable cause, IElement element) {
|
||||
super(cause);
|
||||
|
||||
if(element != null) {
|
||||
this.lineNumber = element.getEndLine();
|
||||
this.characterStart = element.getStartCharacter();
|
||||
this.characterEnd = element.getEndCharacter();
|
||||
}//if//
|
||||
}//ViewBuilderException()//
|
||||
/**
|
||||
* ViewBuilderException constructor.
|
||||
* @param message The message to be displayed to the user.
|
||||
* @param cause The causing exception.
|
||||
* @param element The xml element that is causing the exception.
|
||||
*/
|
||||
public ViewBuilderException(String message, Throwable cause, IElement element) {
|
||||
super(message, cause);
|
||||
|
||||
if(element != null) {
|
||||
this.lineNumber = element.getEndLine();
|
||||
this.characterStart = element.getStartCharacter();
|
||||
this.characterEnd = element.getEndCharacter();
|
||||
}//if//
|
||||
}//ViewBuilderException()//
|
||||
/**
|
||||
* Gets the error's source's line index.
|
||||
* @return The one based line number from the beginning of the file. This may be <= 0 if unkown.
|
||||
*/
|
||||
public int getCharacterEnd() {
|
||||
return characterEnd;
|
||||
}//getCharacterEnd()//
|
||||
/**
|
||||
* Gets the error's source's first character's index.
|
||||
* @return The first (zero based) character index from the start of the file. This may be < 0 if unkown.
|
||||
*/
|
||||
public int getCharacterStart() {
|
||||
return characterStart;
|
||||
}//getCharacterStart()//
|
||||
/**
|
||||
* Gets the error's source's last character's index.
|
||||
* @return The last (zero based) character index from the start of the file. This may be < 0 if unkown.
|
||||
*/
|
||||
public int getLineNumber() {
|
||||
return lineNumber;
|
||||
}//getLineNumber()//
|
||||
}//ViewBuilderException//
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.util.xml.IElement;
|
||||
|
||||
public interface IAbstractModel {
|
||||
/**
|
||||
* Reads a boolean from a source string.
|
||||
* @param source The source to read from.
|
||||
* @param defaultValue The optional default value if the source is unreadable or null.
|
||||
* @return The read boolean value.
|
||||
*/
|
||||
public Boolean readBoolean(String source, Boolean defaultValue);
|
||||
/**
|
||||
* Reads the required type which can be one of [required, optional, none].
|
||||
* @param source The source to read from.
|
||||
* @param defaultValue The optional default value if the source is unreadable or null.
|
||||
* @return The read required type value.
|
||||
*/
|
||||
public String readRequiredType(String source, String defaultValue);
|
||||
/**
|
||||
* Gets the document element that best matches with this model, or null if the model was not created from a document.
|
||||
* <p>Note: This may be null or empty as it is an optional parameter useful only for debugging.</p>
|
||||
* @return The document element from which this model was derived.
|
||||
*/
|
||||
public IElement getDocumentElement();
|
||||
}//IAbstractModel//
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.view.builder.ViewBuilderException;
|
||||
|
||||
public interface IAbstractPart extends IAbstractModel {
|
||||
/**
|
||||
* Gets the value holder's held object class name.
|
||||
* @param valueHolderName The value holder whose value type is required.
|
||||
* @return The class of object held by the value holder.
|
||||
* @throws ViewBuilderException If the value holder's held type is not a valid class name or the class is not loadable, or if the parameter type(s) could not be loaded.
|
||||
*/
|
||||
public String getValueHolderType(String valueHolderName);
|
||||
/**
|
||||
* Gets the method parameter classes in order that they occur.
|
||||
* @param methodParameters The parameters of the method excluding the return type.
|
||||
* @return The fully qualified class names using java source notation ('.' instead of '/' and '$' as separators, and with "[]" at the end for arrays).
|
||||
*/
|
||||
public String[] getMethodParameterTypes(String methodSignature);
|
||||
/**
|
||||
* Gets the component data containing this reference.
|
||||
* @return The refering component data.
|
||||
*/
|
||||
public IComponentData getComponent();
|
||||
/**
|
||||
* Sets the component data containing this reference.
|
||||
* @param component The refering component data.
|
||||
*/
|
||||
public void setComponent(IComponentData component);
|
||||
/**
|
||||
* Gets the comments for the component data.
|
||||
* @return The set of xml comments that occured just prior to the component's tag.
|
||||
*/
|
||||
public abstract String[] getComments();
|
||||
/**
|
||||
* Sets the comments for the component data.
|
||||
* @param comments The set of xml comments that occured just prior to the component's tag.
|
||||
*/
|
||||
public abstract void setComments(String[] comments);
|
||||
}//IAbstractPart//
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.util.IManagedList;
|
||||
|
||||
public interface IAssociationAbstractNodePart extends IAssociationAbstractPart {
|
||||
/**
|
||||
* Gets the children that make up the tree that defines how the association value is derived.
|
||||
* @return The collection of AssociationLinkPart, AssociationIndirectLinkPart, and AssociationTargetPart instances that are used to get a value for the association.
|
||||
*/
|
||||
public IManagedList getChildren();
|
||||
/**
|
||||
* Gets the parent node in the tree.
|
||||
* @return The parent association node part which may be an association group, association link, or association indirect link, or will be null if this is the association group (root of the tree).
|
||||
*/
|
||||
public IAssociationAbstractNodePart getParent();
|
||||
/**
|
||||
* Sets the parent node in the tree.
|
||||
* @param parent The parent association node part which may be an association group, association link, or association indirect link, or will be null if this is the association group (root of the tree).
|
||||
*/
|
||||
public void setParent(IAssociationAbstractNodePart parent);
|
||||
}//IAssociationAbstractNodePart//
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2009 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IAssociationAbstractPart extends IAbstractPart {
|
||||
public static final String ATTRIBUTE_FUNCTION = "function";
|
||||
public static final String ATTRIBUTE_VALUE_HOLDER_NAME = "value-holder";
|
||||
public static final String ATTRIBUTE_HELD_TYPE_NAME = "value-type";
|
||||
public static final String ATTRIBUTE_HELD_TYPE_NAME2 = "held-type";
|
||||
public static final String ATTRIBUTE_ROW_TYPE_NAME = "row-type";
|
||||
/** Note: value-type is identical to row-type and can be used in place of row-type. */
|
||||
public static final String ATTRIBUTE_VALUE_TYPE_NAME = "value-type";
|
||||
public static final String ATTRIBUTE_ATTRIBUTE_NAME = "attribute";
|
||||
public static final String ATTRIBUTE_STATIC_VALUE = "value";
|
||||
public static final String ATTRIBUTE_GETTER_NAME = "getter";
|
||||
public static final String ATTRIBUTE_GETTER_SIGNATURE = "getter-signature";
|
||||
public static final String ATTRIBUTE_SETTER_NAME = "setter";
|
||||
public static final String ATTRIBUTE_SETTER_SIGNATURE = "setter-signature";
|
||||
public static final String ATTRIBUTE_EVENT_NAME = "event";
|
||||
public static final String ATTRIBUTE_INVERT_LOGIC = "invert-logic";
|
||||
public static final String ATTRIBUTE_DECORATION_CAPABLE = "decorate";
|
||||
public static final String ATTRIBUTE_DECORATION_ATTRIBUTE = "decoration-attribute";
|
||||
public static final String ATTRIBUTE_ORIGINAL_VALUE_GETTER_NAME = "original-value-getter";
|
||||
public static final String ATTRIBUTE_NAVIGATE_COLLECTION_VALUES = "navigate-collection-values";
|
||||
/**
|
||||
* Gets the AssociationAbstractPartType that is the parent for this part.
|
||||
* @return The parent association part which must either be an AssociationLinkPart or AssociationGroupPart.
|
||||
*/
|
||||
public IAssociationAbstractNodePart getParent();
|
||||
/**
|
||||
* Gets the root part for the association tree of parts.
|
||||
* @return The association group part which is the root of any association part tree.
|
||||
*/
|
||||
public IAssociationGroupPart getRoot();
|
||||
}//IAssociationAbstractPart//
|
||||
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2009 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.view.builder.IClassMetadataLoader;
|
||||
|
||||
public interface IAssociationAbstractTargetPart extends IAssociationAbstractPart {
|
||||
/**
|
||||
* Gets the name of the value holder associated with the part.
|
||||
* @return The the name of the value holder that defines the getter/setter methods.
|
||||
*/
|
||||
public String getValueHolderName();
|
||||
/**
|
||||
* Sets the name of the value holder associated with the part.
|
||||
* <p><b>Warning: This method will clear the getter/setter data.</b></p>
|
||||
* @param valueHolderName The the name of the value holder that defines the getter/setter methods.
|
||||
*/
|
||||
public void setValueHolderName(String valueHolderName);
|
||||
/**
|
||||
* Gets the qualified class name for the row class.
|
||||
* @return The qualified class name of the row type supported by this association which may be null in certain cases.
|
||||
*/
|
||||
public String getRowTypeName();
|
||||
/**
|
||||
* Sets the qualified class name for the row class.
|
||||
* @param rowTypeName The qualified class name of the row type supported by this association which may be null in certain cases.
|
||||
*/
|
||||
public void setRowTypeName(String rowTypeName);
|
||||
/**
|
||||
* Gets whether the association should invert the boolean result.
|
||||
* <p>This is only allowed (it is optional) for associations which have a type of java.lang.Boolean.</p>
|
||||
* @return Whether the boolean result should be inverted.
|
||||
*/
|
||||
public Boolean getInvertLogic();
|
||||
/**
|
||||
* Sets whether the association should invert the boolean result.
|
||||
* <p>This is only allowed (it is optional) for associations which have a type of java.lang.Boolean.</p>
|
||||
* @param invertLogic Whether the boolean result should be inverted.
|
||||
*/
|
||||
public void setInvertLogic(Boolean invertLogic);
|
||||
/**
|
||||
* Gets the getter method name for the attribute.
|
||||
* @return The name of the getter method used to access the value.
|
||||
*/
|
||||
public String getGetterName();
|
||||
/**
|
||||
* Gets the setter method name for the attribute.
|
||||
* @return The name of the setter method used to set the value.
|
||||
*/
|
||||
public String getSetterName();
|
||||
/**
|
||||
* Gets the getter method's signature in class file format.
|
||||
* @return The signature that unqiuely identifies the getter method.
|
||||
*/
|
||||
public String getGetterSignature();
|
||||
/**
|
||||
* Gets the setter method's signature in class file format.
|
||||
* @return The signature that unqiuely identifies the setter method.
|
||||
*/
|
||||
public String getSetterSignature();
|
||||
/**
|
||||
* Gets the default row-type name for the target part.
|
||||
* @return The row-type name defined by the related value-holder. The value-holder may be specified by the group part if this is an immediate child of the group part.
|
||||
*/
|
||||
public String getDefaultRowTypeName();
|
||||
/**
|
||||
* Gets whether the association is capable of being linked to decorations.
|
||||
* @return Whether the association should access decorations.
|
||||
*/
|
||||
public Boolean getDecorationCapable();
|
||||
/**
|
||||
* Gets the decoration attribute name. This may be null if the decorations are attached to the association's input object directly.
|
||||
* @return The attribute name or null.
|
||||
*/
|
||||
public String getDecorationAttribute();
|
||||
/**
|
||||
* Gets the getter method name used to access the original value for the association.
|
||||
* @return The method called when the association needs the original value (the value the new value is over writing).
|
||||
*/
|
||||
public String getOriginalValueGetterName();
|
||||
/**
|
||||
* Gets the getter method signature used to access the original value for the association.
|
||||
* @return The signature for the method called when the association needs the original value (the value the new value is over writing).
|
||||
*/
|
||||
public String getOriginalValueGetterSignature();
|
||||
/**
|
||||
* Gets the getter method's signature class names in java source format.
|
||||
* @return The collection of signature parameter qualified class names in java source format.
|
||||
*/
|
||||
public String[] getGetterSignatureTypeNames();
|
||||
/**
|
||||
* Gets the original value getter method's signature class names in java source format.
|
||||
* @return The collection of signature parameter qualified class names in java source format.
|
||||
*/
|
||||
public String[] getOriginalValueGetterSignatureTypeNames();
|
||||
/**
|
||||
* Gets the setter method's signature class names in java source format.
|
||||
* @return The collection of signature parameter qualified class names in java source format.
|
||||
*/
|
||||
public String[] getSetterSignatureTypeNames();
|
||||
/**
|
||||
* Gets the method's return type's qualified name.
|
||||
* @param applicationClassMetadataLoader The class metadata loader to use when loading application class metadata.
|
||||
* @return The getter method's return type which will always be non-null.
|
||||
*/
|
||||
public String getGetterResultType(IClassMetadataLoader applicationClassMetadataLoader);
|
||||
}//IAssociationAbstractTargetPart//
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2006,2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.util.IManagedList;
|
||||
|
||||
public interface IAssociationArbitraryEventPart extends IAbstractModel {
|
||||
/**
|
||||
* Gets the event names that should be listened to for the target value.
|
||||
* @return The collection of String instances, one for each event listened to on the association's result.
|
||||
*/
|
||||
public IManagedList getEvents();
|
||||
/**
|
||||
* Gets the attributes names that should be listened to for the target value.
|
||||
* @return The collection of String instances, one for each attribute listened to on the association's result.
|
||||
*/
|
||||
public IManagedList getAttributes();
|
||||
/**
|
||||
* Gets the association nodes that contain additional change listening for the target value.
|
||||
* This allows listening to events furthor down in the object tree, beyond the target value.
|
||||
* @return The collection of AssociationNodePart instances.
|
||||
*/
|
||||
public IManagedList getNodes();
|
||||
}//IAssociationArbitraryEventPart//
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IAssociationAttributeTargetPart extends IAssociationAbstractTargetPart {
|
||||
/**
|
||||
* Sets the qualified class name for the class which defines the referenced part.
|
||||
* <p>This is only used for multi associations or single associations where the target is nested in a link association.</p>
|
||||
* <p><b>Warning: This method will clear the attribute & getter/setter data.</b></p>
|
||||
* @param rowTypeName The qualified class name of the row type supported by this association.
|
||||
*/
|
||||
public void setRowTypeName(String rowTypeName);
|
||||
/**
|
||||
* Gets the name of the attribute.
|
||||
* @return The name of the attribute.
|
||||
*/
|
||||
public String getAttributeName();
|
||||
/**
|
||||
* Sets the name of the attribute.
|
||||
* @param attributeName The name of the attribute.
|
||||
*/
|
||||
public void setAttributeName(String attributeName);
|
||||
}//IAssociationAttributeTargetPart//
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IAssociationGroupPart extends IAssociationAbstractNodePart {
|
||||
/**
|
||||
* Gets the AssociationPartType that defines how this association should look.
|
||||
* @return The definition for this association (similar to how a class works for an instance).
|
||||
*/
|
||||
public IAssociationPartType getType();
|
||||
/**
|
||||
* Gets the name of the value holder associated with the part.
|
||||
* <p>This is only used for root level links in the group and only if this is a single-association. This must be null otherwise.</p>
|
||||
* @return The the name of the value holder whose value has the attribute that will be listened to.
|
||||
*/
|
||||
public String getValueHolderName();
|
||||
/**
|
||||
* Sets the name of the value holder associated with the part.
|
||||
* <p>This is only used for root level links in the group and only if this is a single-association. This must be null otherwise.</p>
|
||||
* <p><b>Warning: This method will clear the attribute data.</b></p>
|
||||
* @param valueHolderName The the name of the value holder which can be null for multi-associations.
|
||||
*/
|
||||
public void setValueHolderName(String valueHolderName);
|
||||
}//IAssociationGroupPart//
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.util.IManagedList;
|
||||
import com.foundation.view.builder.IClassMetadataLoader;
|
||||
|
||||
public interface IAssociationIndirectLinkPart extends IAssociationAbstractNodePart, IAssociationArbitraryEventPart {
|
||||
/**
|
||||
* Gets the EventPart instances that should be listened to for the target value.
|
||||
* @return The collection of EventPart instances, one for each event listened to on the association's result.
|
||||
*/
|
||||
public IManagedList getEvents();
|
||||
/**
|
||||
* Gets the AttributePart instances that should be listened to for the target value.
|
||||
* @return The collection of AttributePart instances, one for each attribute listened to on the association's result.
|
||||
*/
|
||||
public IManagedList getAttributes();
|
||||
/**
|
||||
* Gets the association nodes that contain additional change listening for the target value.
|
||||
* This allows listening to events furthor down in the object tree, beyond the target value.
|
||||
* @return The collection of AssociationNodePart instances.
|
||||
*/
|
||||
public IManagedList getNodes();
|
||||
/**
|
||||
* Gets the name of the required value holder associated with the part.
|
||||
* @return The name of the value holder whose value has the getter method and events that will be listened to.
|
||||
*/
|
||||
public String getValueHolderName();
|
||||
/**
|
||||
* Sets the name of the required value holder associated with the part.
|
||||
* <p><b>Warning: This method will clear the method data.</b></p>
|
||||
* @param valueHolderName The name of the value holder whose value has the getter method and events that will be listened to.
|
||||
*/
|
||||
public void setValueHolderName(String valueHolderName);
|
||||
/**
|
||||
* Gets the type of row which will be passed to the accessor method.
|
||||
* @return The qualified class name of the row type supported by this association.
|
||||
*/
|
||||
public String getRowTypeName();
|
||||
/**
|
||||
* Sets the type of row which will be passed to the accessor method.
|
||||
* <p><b>Warning: This method will clear the method data.</b></p>
|
||||
* @param rowTypeName The qualified class name of the row type supported by this association.
|
||||
*/
|
||||
public void setRowTypeName(String rowTypeName);
|
||||
/**
|
||||
* Gets the name of the getter method used to get the result of the link.
|
||||
* @return The name of the getter method defined by the value holder's held value.
|
||||
*/
|
||||
public String getGetterName();
|
||||
/**
|
||||
* Sets the name of the getter method used to get the result of the link.
|
||||
* @param getterName The name of the getter method defined by the value holder's held value.
|
||||
*/
|
||||
public void setGetterName(String getterName);
|
||||
/**
|
||||
* Gets the signature of the getter method used to get the result of the link.
|
||||
* @return The signature of the getter method defined by the value holder's held value.
|
||||
*/
|
||||
public String getGetterSignature();
|
||||
/**
|
||||
* Sets the signature of the getter method used to get the result of the link.
|
||||
* @param getterSignature The signature of the getter method defined by the value holder's held value.
|
||||
*/
|
||||
public void setGetterSignature(String getterSignature);
|
||||
/**
|
||||
* Gets the method's return type's qualified name.
|
||||
* @param applicationClassMetadataLoader The class metadata loader to use when loading application class metadata.
|
||||
* @return The getter method's return type which will always be non-null.
|
||||
*/
|
||||
public String getGetterResultType(IClassMetadataLoader applicationClassMetadataLoader);
|
||||
/**
|
||||
* Gets the getter method's signature class names in java source format.
|
||||
* @return The collection of signature parameter qualified class names in java source format.
|
||||
*/
|
||||
public String[] getGetterSignatureTypeNames();
|
||||
}//IAssociationIndirectLinkPart//
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.view.builder.IClassMetadataLoader;
|
||||
|
||||
public interface IAssociationLinkPart extends IAssociationAbstractNodePart {
|
||||
/**
|
||||
* Gets the qualified class name for the class which defines the referenced part, or if value holder related, the type of row which will be passed to the accessor methods.
|
||||
* @return The qualified class name of the row type supported by this association.
|
||||
*/
|
||||
public String getRowTypeName();
|
||||
/**
|
||||
* Sets the qualified class name for the class which defines the referenced part, or if value holder related, the type of row which will be passed to the accessor methods.
|
||||
* <p><b>Warning: This method will clear the attribute data.</b></p>
|
||||
* @param rowTypeName The qualified class name of the row type supported by this association.
|
||||
*/
|
||||
public void setRowTypeName(String rowTypeName);
|
||||
/**
|
||||
* Gets the name of the attribute.
|
||||
* @return The name of the attribute.
|
||||
*/
|
||||
public String getAttributeName();
|
||||
/**
|
||||
* Sets the name of the attribute.
|
||||
* @param attributeName The name of the attribute.
|
||||
*/
|
||||
public void setAttributeName(String attributeName);
|
||||
/**
|
||||
* Gets the getter method name for the attribute.
|
||||
* @return The name of the getter method used to access the value.
|
||||
*/
|
||||
public String getGetterName();
|
||||
/**
|
||||
* Gets the method's return type's qualified name.
|
||||
* @param applicationClassMetadataLoader The class metadata loader to use when loading application class metadata.
|
||||
* @return The getter method's return type which will always be non-null.
|
||||
*/
|
||||
public String getGetterResultType(IClassMetadataLoader applicationClassMetadataLoader);
|
||||
}//IAssociationLinkPart//
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2009 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.util.IManagedList;
|
||||
|
||||
public interface IAssociationMethodTargetPart extends IAssociationAbstractTargetPart, IAssociationArbitraryEventPart {
|
||||
/**
|
||||
* Sets the qualified class name for the type of row which will have the accessor methods or be passed to the accessor methods (depending on whether a value holder is specified).
|
||||
* <p>This is required if this is part of a multi-association or if this target's parent is not the group.</p>
|
||||
* <p><b>Warning: This method will clear the getter/setter data.</b></p>
|
||||
* @param rowTypeName The qualified class name of the row type supported by this association.
|
||||
*/
|
||||
public void setRowTypeName(String rowTypeName);
|
||||
/**
|
||||
* Gets the event names that should be listened to for the target value.
|
||||
* @return The collection of String instances, one for each event listened to on the association's result.
|
||||
*/
|
||||
public IManagedList getEvents();
|
||||
/**
|
||||
* Gets the attributes names that should be listened to for the target value.
|
||||
* @return The collection of String instances, one for each attribute listened to on the association's result.
|
||||
*/
|
||||
public IManagedList getAttributes();
|
||||
/**
|
||||
* Gets the association nodes that contain additional change listening for the target value.
|
||||
* This allows listening to events furthor down in the object tree, beyond the target value.
|
||||
* @return The collection of AssociationNodePart instances.
|
||||
*/
|
||||
public IManagedList getNodes();
|
||||
/**
|
||||
* Sets the getter method name.
|
||||
* @param getterName The name of the getter method used to access the value.
|
||||
*/
|
||||
public void setGetterName(String getterName);
|
||||
/**
|
||||
* Sets the getter method's signature in class file format.
|
||||
* @param getterSignature The signature that unqiuely identifies the getter method.
|
||||
*/
|
||||
public void setGetterSignature(String getterSignature);
|
||||
/**
|
||||
* Sets the optional setter method name.
|
||||
* @param setterMethodName The name of the setter method used to set the value.
|
||||
*/
|
||||
public void setSetterName(String setterName);
|
||||
/**
|
||||
* Sets the setter method's signature in class file format.
|
||||
* @param setterSignature The signature that unqiuely identifies the setter method.
|
||||
*/
|
||||
public void setSetterSignature(String setterSignature);
|
||||
}//IAssociationMethodTargetPart//
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.util.IManagedList;
|
||||
|
||||
public interface IAssociationNodePart extends IAbstractPart {
|
||||
/**
|
||||
* Gets the event names that should be listened to for the leaf node.
|
||||
* <p>Warning: This is only valid for leaf nodes.</p>
|
||||
* @return The collection of String instances, one for each event listened to on the association's result.
|
||||
*/
|
||||
public IManagedList getEvents();
|
||||
/**
|
||||
* Gets the attributes names that should be listened to for the leaf node.
|
||||
* <p>Warning: This is only valid for leaf nodes.</p>
|
||||
* @return The collection of String instances, one for each attribute listened to on the association's result.
|
||||
*/
|
||||
public IManagedList getAttributes();
|
||||
/**
|
||||
* Gets the qualified class name which defines what values this node applies to.
|
||||
* @return The qualified class name of the row type supported by this association node.
|
||||
*/
|
||||
public String getRowTypeName();
|
||||
/**
|
||||
* Sets the qualified class name which defines what values this node applies to.
|
||||
* @param rowTypeName The qualified class name of the row type supported by this association node.
|
||||
*/
|
||||
public void setRowTypeName(String rowTypeName);
|
||||
}//IAssociationNodePart//
|
||||
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.util.IManagedList;
|
||||
import com.foundation.view.builder.IClassMetadataLoader;
|
||||
|
||||
public interface IAssociationPart extends IAbstractPart {
|
||||
public static final String ATTRIBUTE_FUNCTION = "function";
|
||||
public static final String ATTRIBUTE_VALUE_HOLDER_NAME = "value-holder";
|
||||
public static final String ATTRIBUTE_HELD_TYPE_NAME = "value-type";
|
||||
public static final String ATTRIBUTE_HELD_TYPE_NAME2 = "held-type";
|
||||
public static final String ATTRIBUTE_ROW_TYPE_NAME = "row-type";
|
||||
/** Note: value-type is identical to row-type and can be used in place of row-type. */
|
||||
public static final String ATTRIBUTE_VALUE_TYPE_NAME = "value-type";
|
||||
public static final String ATTRIBUTE_ATTRIBUTE_NAME = "attribute";
|
||||
public static final String ATTRIBUTE_GETTER_NAME = "getter";
|
||||
public static final String ATTRIBUTE_GETTER_SIGNATURE = "getter-signature";
|
||||
public static final String ATTRIBUTE_SETTER_NAME = "setter";
|
||||
public static final String ATTRIBUTE_SETTER_SIGNATURE = "setter-signature";
|
||||
public static final String ATTRIBUTE_EVENT_NAME = "event";
|
||||
public static final String ATTRIBUTE_INVERT_LOGIC = "invert-logic";
|
||||
public static final String ATTRIBUTE_CONVERT_TO_CONTROL_NAME = "convert-to-control-name";
|
||||
public static final String ATTRIBUTE_CONVERT_TO_CONTROL_SIGNATURE = "convert-to-control-signature";
|
||||
public static final String ATTRIBUTE_CONVERT_FROM_CONTROL_NAME = "convert-from-control-name";
|
||||
public static final String ATTRIBUTE_CONVERT_FROM_CONTROL_SIGNATURE = "convert-from-control-signature";
|
||||
public static final String ATTRIBUTE_CONVERT_VALUE_HOLDER_NAME = "convert-value-holder";
|
||||
/**
|
||||
* Gets the AssociationPartType that defines how this attribute part should look.
|
||||
* @return The definition for this attribute part (similar to how a class works for an instance).
|
||||
*/
|
||||
public IAssociationPartType getType();
|
||||
/**
|
||||
* Gets the name of the value holder associated with the part.
|
||||
* <p>This is required for single-associations, for multi-associations it is optional, but if provided the the getter and setter methods may accept the row object as a parameter.</p>
|
||||
* @return The the name of the value holder which can be null for multi-associations.
|
||||
*/
|
||||
public String getValueHolderName();
|
||||
/**
|
||||
* Sets the name of the value holder associated with the part.
|
||||
* <p>This is required for single-associations, for multi-associations it is optional, but if provided the the getter and setter methods may accept the row object as a parameter.</p>
|
||||
* <p><b>Warning: This method will clear the attribute & getter/setter data.</b></p>
|
||||
* @param valueHolderName The the name of the value holder which can be null for multi-associations.
|
||||
*/
|
||||
public void setValueHolderName(String valueHolderName);
|
||||
/**
|
||||
* Gets the qualified class name for the class which defines the association.
|
||||
* <p>This is only allowed (it is optional) for associations which define a value holder.</p>
|
||||
* @return The qualified class name of the value holder held type defining the attribute, methods, and events in this part.
|
||||
*/
|
||||
public String getHeldTypeName();
|
||||
/**
|
||||
* Sets the qualified class name for the class which defines the association.
|
||||
* <p>This is only allowed (it is optional) for associations which define a value holder.</p>
|
||||
* <p><b>Warning: This method will clear the attribute & getter/setter data.</b></p>
|
||||
* @param heldTypeName The qualified class name of the value holder held type defining the attribute, methods, and events in this part.
|
||||
*/
|
||||
public void setHeldTypeName(String heldTypeName);
|
||||
/**
|
||||
* Gets the qualified class name for the class which defines the referenced part, or if value holder related, the type of row which will be passed to the accessor methods.
|
||||
* <p>This is only defined for multi-associations and not for single-associations since only multi-associations have rows.
|
||||
* If this is a child association (chained) then this is the type of data passed to the association from the parent association.</p>
|
||||
* @return The qualified class name of the row type supported by this association.
|
||||
*/
|
||||
public String getRowTypeName();
|
||||
/**
|
||||
* Sets the qualified class name for the class which defines the referenced part, or if value holder related, the type of row which will be passed to the accessor methods.
|
||||
* <p>This is only defined for multi-associations and not for single-associations since only multi-associations have rows.
|
||||
* If this is a child association (chained) then this is the type of data passed to the association from the parent association.</p>
|
||||
* <p><b>Warning: This method will clear the attribute & getter/setter data.</b></p>
|
||||
* @param rowTypeName The qualified class name of the row type supported by this association.
|
||||
*/
|
||||
public void setRowTypeName(String rowTypeName);
|
||||
/**
|
||||
* Gets the optional name of the attribute.
|
||||
* @return The name of the attribute, or null if a getter and/or setter and events will be non-null.
|
||||
*/
|
||||
public String getAttributeName();
|
||||
/**
|
||||
* Sets the optional name of the attribute.
|
||||
* @param attributeName The name of the attribute, or null if a getter and/or setter and events will be non-null.
|
||||
*/
|
||||
public void setAttributeName(String attributeName);
|
||||
/**
|
||||
* Gets the getter optional method name.
|
||||
* @return The name of the getter method used to access the value.
|
||||
*/
|
||||
public String getGetterName();
|
||||
/**
|
||||
* Sets the optional getter method name.
|
||||
* @param getterName The name of the getter method used to access the value.
|
||||
*/
|
||||
public void setGetterName(String getterName);
|
||||
/**
|
||||
* Gets the getter method's signature in class file format.
|
||||
* @return The signature that unqiuely identifies the getter method.
|
||||
*/
|
||||
public String getGetterSignature();
|
||||
/**
|
||||
* Sets the getter method's signature in class file format.
|
||||
* @param getterSignature The signature that unqiuely identifies the getter method.
|
||||
*/
|
||||
public void setGetterSignature(String getterSignature);
|
||||
/**
|
||||
* Gets the method's return type's qualified name.
|
||||
* @param applicationClassMetadataLoader The class metadata loader to use when loading application class metadata.
|
||||
* @return The getter method's return type which will always be non-null.
|
||||
*/
|
||||
public String getGetterResultType(IClassMetadataLoader applicationClassMetadataLoader);
|
||||
/**
|
||||
* Gets the optional setter method name.
|
||||
* @return The name of the setter method used to set the value.
|
||||
*/
|
||||
public String getSetterName();
|
||||
/**
|
||||
* Sets the optional setter method name.
|
||||
* @param setterMethodName The name of the setter method used to set the value.
|
||||
*/
|
||||
public void setSetterName(String setterName);
|
||||
/**
|
||||
* Gets the setter method's signature in class file format.
|
||||
* @return The signature that unqiuely identifies the setter method.
|
||||
*/
|
||||
public String getSetterSignature();
|
||||
/**
|
||||
* Sets the setter method's signature in class file format.
|
||||
* @param setterSignature The signature that unqiuely identifies the setter method.
|
||||
*/
|
||||
public void setSetterSignature(String setterSignature);
|
||||
/**
|
||||
* Gets the getter method's signature class names in java source format.
|
||||
* @return The collection of signature parameter qualified class names in java source format.
|
||||
*/
|
||||
public String[] getGetterSignatureTypeNames();
|
||||
/**
|
||||
* Gets the setter method's signature class names in java source format.
|
||||
* @return The collection of signature parameter qualified class names in java source format.
|
||||
*/
|
||||
public String[] getSetterSignatureTypeNames();
|
||||
/**
|
||||
* Gets the event associations for this association.
|
||||
* @return The EventAssociation instances for this association.
|
||||
*/
|
||||
public IManagedList getEvents();
|
||||
/**
|
||||
* Gets the child association for this association chain.
|
||||
* @return The next association in the chain.
|
||||
*/
|
||||
public IAssociationPart getChildAssociation();
|
||||
/**
|
||||
* Sets the child association for this association chain.
|
||||
* @param childAssociation The next association in the chain.
|
||||
*/
|
||||
public void setChildAssociation(IAssociationPart childAssociation);
|
||||
/**
|
||||
* Gets whether the association should invert the boolean result.
|
||||
* <p>This is only allowed (it is optional) for associations which have a type of java.lang.Boolean.</p>
|
||||
* @return Whether the boolean result should be inverted.
|
||||
*/
|
||||
public Boolean getInvertLogic();
|
||||
/**
|
||||
* Sets whether the association should invert the boolean result.
|
||||
* <p>This is only allowed (it is optional) for associations which have a type of java.lang.Boolean.</p>
|
||||
* @param invertLogic Whether the boolean result should be inverted.
|
||||
*/
|
||||
public void setInvertLogic(Boolean invertLogic);
|
||||
/**
|
||||
* Gets the optional name of the method called, passing the data and returning the converted data, prior to using the data in the control.
|
||||
* @return The conversion method name called before refreshing the control.
|
||||
*/
|
||||
public String getConvertToControlName();
|
||||
/**
|
||||
* Sets the optional name of the method called, passing the data and returning the converted data, prior to using the data in the control.
|
||||
* @param convertToControlName The conversion method name called before refreshing the control.
|
||||
*/
|
||||
public void setConvertToControlName(String convertToControlName);
|
||||
/**
|
||||
* Gets the signature of the method called, passing the data and returning the converted data, prior to using the data in the control.
|
||||
* <p>This is required if the name is set.</p>
|
||||
* @return The conversion method signature called before refreshing the control.
|
||||
*/
|
||||
public String getConvertToControlSignature();
|
||||
/**
|
||||
* Sets the signature of the method called, passing the data and returning the converted data, prior to using the data in the control.
|
||||
* <p>This is required if the name is set.</p>
|
||||
* @param convertToControlSignature The conversion method signature called before refreshing the control.
|
||||
*/
|
||||
public void setConvertToControlSignature(String convertToControlSignature);
|
||||
/**
|
||||
* Gets the optional name of the method called, passing the data and returning the converted data, prior to placing the data in the model.
|
||||
* @return The conversion method name called before synchronizing the control.
|
||||
*/
|
||||
public String getConvertFromControlName();
|
||||
/**
|
||||
* Sets the optional name of the method called, passing the data and returning the converted data, prior to placing the data in the model.
|
||||
* @param convertFromControlName The conversion method name called before synchronizing the control.
|
||||
*/
|
||||
public void setConvertFromControlName(String convertFromControlName);
|
||||
/**
|
||||
* Gets the signature of the method called, passing the data and returning the converted data, prior to placing the data in the model.
|
||||
* <p>This is required if the name is set.</p>
|
||||
* @return The conversion method signature called before synchronizing the control.
|
||||
*/
|
||||
public String getConvertFromControlSignature();
|
||||
/**
|
||||
* Sets the signature of the method called, passing the data and returning the converted data, prior to placing the data in the model.
|
||||
* <p>This is required if the name is set.</p>
|
||||
* @param convertFromControlSignature The conversion method signature called before synchronizing the control.
|
||||
*/
|
||||
public void setConvertFromControlSignature(String convertFromControlSignature);
|
||||
/**
|
||||
* Gets the name of the value holder associated with the conversion methods defined by the part.
|
||||
* <p>This is required for associations that specify a TO or FROM conversion.</p>
|
||||
* @return The the name of the value holder which can be null for multi-associations.
|
||||
*/
|
||||
public String getConvertValueHolderName();
|
||||
/**
|
||||
* Sets the name of the value holder used by the part to convert data during a refresh or synchronize.
|
||||
* <p><b>Warning: This method will clear the conversion to/from data.</b></p>
|
||||
* @param convertValueHolderName The the name of the value holder which may only be null if no conversion method names and signatures are provided.
|
||||
*/
|
||||
public void setConvertValueHolderName(String convertValueHolderName);
|
||||
}//IAssociationPart//
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IAssociationPartType extends IAbstractModel {
|
||||
public static final String METADATA_NODE_NAME = "association";
|
||||
public static final String NODE_NAME_SHORT = "association";
|
||||
public static final String NODE_NAME_ASSOCIATION_GROUP = "association-group";
|
||||
public static final String NODE_NAME_ASSOCIATION_LINK = "association-link"; //Deprecated.
|
||||
public static final String NODE_NAME_ASSOCIATION_INDIRECT_LINK = "association-link-indirect"; //Deprecated.
|
||||
public static final String NODE_NAME_ASSOCIATION_ATTRIBUTE_LINK = "association-link-attribute";
|
||||
public static final String NODE_NAME_ASSOCIATION_METHOD_LINK = "association-link-method";
|
||||
public static final String NODE_NAME_ASSOCIATION_ATTRIBUTE_TARGET = "association-target-attribute";
|
||||
public static final String NODE_NAME_ASSOCIATION_METHOD_TARGET = "association-target-method";
|
||||
public static final String NODE_NAME_ASSOCIATION_VALUE_TARGET = "association-target-value";
|
||||
public static final String NODE_NAME_ASSOCIATION_VALUE_TARGET_2 = "association-target-static";
|
||||
public static final String NODE_NAME_ASSOCIATION_ATTRIBUTE = "association-attribute";
|
||||
public static final String NODE_NAME_ASSOCIATION_EVENT = "association-event";
|
||||
public static final String NODE_NAME_ASSOCIATION_NODE = "association-node";
|
||||
|
||||
public static final int ASSOCIATION_TYPE_SINGLE = 0;
|
||||
public static final int ASSOCIATION_TYPE_MULTI = 1;
|
||||
public static final int ASSOCIATION_TYPE_VARIABLE = 2;
|
||||
public static final int ASSOCIATION_TYPE_COLLECTIONG_MULTI = 3;
|
||||
|
||||
public static final String ATTRIBUTE_FUNCTION = "function";
|
||||
public static final String ATTRIBUTE_ASSOCIATION_TYPE = "association-type";
|
||||
public static final String ATTRIBUTE_UNIQUE_ROW_TYPE = "unique-row-type";
|
||||
public static final String ATTRIBUTE_GETTER = "getter";
|
||||
public static final String ATTRIBUTE_SETTER = "setter";
|
||||
public static final String ATTRIBUTE_DATA_TYPE = "data-type";
|
||||
/**
|
||||
* Gets the function of the association.
|
||||
* @return The function determines which part of the component uses it.
|
||||
*/
|
||||
public abstract String getFunction();
|
||||
/**
|
||||
* Gets the type of association.
|
||||
* @return The type code for the association defining whether it is a single association meaning one value in and one out, multi meaning N values in and N values out, or variable meaning it could be either single or multi.
|
||||
*/
|
||||
public abstract Integer getAssociationType();
|
||||
/**
|
||||
* Determines whether the association type is set to single.
|
||||
* @return Whether the association is not row-related.
|
||||
*/
|
||||
public abstract boolean isAssociationTypeSingle();
|
||||
/**
|
||||
* Determines whether the association type is set to multi.
|
||||
* @return Whether the association is row-related.
|
||||
*/
|
||||
public abstract boolean isAssociationTypeMulti();
|
||||
/**
|
||||
* Determines whether the association type is set to variable.
|
||||
* @return Whether the association may optionally be row-related.
|
||||
*/
|
||||
public abstract boolean isAssociationTypeVariable();
|
||||
/**
|
||||
* Determines whether the association type is set to collectiong multi.
|
||||
* @return Whether the association is row-related and results in 0..N values.
|
||||
*/
|
||||
public abstract boolean isAssociationTypeCollectingMulti();
|
||||
/**
|
||||
* Gets whether the association must not duplicate the row type in another association with the same function and in the same component.
|
||||
* @return Whether associations of this type in the same component must have unique row types.
|
||||
*/
|
||||
public abstract Boolean getUniqueRowType();
|
||||
/**
|
||||
* Gets whether a getter method is required, optional, or unnecessary for the association.
|
||||
* @return One of [OPTION_REQUIRED, OPTION_OPTIONAL, OPTION_NONE] indicating whether the view must specify a getter method.
|
||||
*/
|
||||
public abstract String getGetter();
|
||||
/**
|
||||
* Gets whether a setter method is required, optional, or unnecessary for the association.
|
||||
* @return One of [OPTION_REQUIRED, OPTION_OPTIONAL, OPTION_NONE] indicating whether the view must specify a setter method.
|
||||
*/
|
||||
public abstract String getSetter();
|
||||
/**
|
||||
* Gets the class that the association must return instances of.
|
||||
* @return The name of the class that the attribute of getter and setter must return or take as a parameter.
|
||||
*/
|
||||
public abstract String getDataType();
|
||||
}//IAssociationPartType//
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2009 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IAssociationValueTargetPart extends IAssociationAbstractTargetPart {
|
||||
public static final String ATTRIBUTE_VALUE = "value";
|
||||
public static final String ATTRIBUTE_IS_CODE = "is-code";
|
||||
/**
|
||||
* Gets the fixed value for the association.
|
||||
* @return The value as a string.
|
||||
*/
|
||||
public String getValue();
|
||||
/**
|
||||
* Sets the fixed value for the association.
|
||||
* @param value The value as a string.
|
||||
*/
|
||||
public void setValue(String attributeName);
|
||||
/**
|
||||
* Gets whether the value is source code that will resolve to a value instead of the actual value.
|
||||
* @return Whether the value is source code.
|
||||
*/
|
||||
public Boolean getIsCode();
|
||||
/**
|
||||
* Sets whether the value is source code that will resolve to a value instead of the actual value.
|
||||
* @param isCode Whether the value is source code.
|
||||
*/
|
||||
public void setIsCode(Boolean isCode);
|
||||
}//IAssociationAttributeTargetPart//
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.view.builder.IClassMetadataLoader;
|
||||
|
||||
public interface IAttributePart extends IReferencePart {
|
||||
/**
|
||||
* Gets the class that all values for the attribute must inherit or implement.
|
||||
* @param applicationClassMetadataLoader The class metadata loader to use to load the application class metadata.
|
||||
* @return The attribute class as determined by the return type of the attribute's get method.
|
||||
*/
|
||||
public abstract String getAttributeType(IClassMetadataLoader applicationClassMetadataLoader);
|
||||
/**
|
||||
* Gets or generates the attribute's getter method name.
|
||||
* @return The name of the getter method used to access the attribute value.
|
||||
*/
|
||||
public abstract String getGetMethodName();
|
||||
/**
|
||||
* Gets or generates the attribute's setter method name.
|
||||
* @return The name of the setter method used to set the attribute value.
|
||||
*/
|
||||
public abstract String getSetMethodName();
|
||||
/**
|
||||
* Gets the set method's parameter type.
|
||||
* @param defaultType The default type for how the attribute is used within the control. This will be used if the data does not specify a type.
|
||||
* @return The qualified class name of the set method's parameter.
|
||||
*/
|
||||
public abstract String getSetMethodParemeterType(String defaultType);
|
||||
/**
|
||||
* Gets the AttributePartType that defines how this attribute part should look.
|
||||
* @return The definition for this attribute part (similar to how a class works for an instance).
|
||||
*/
|
||||
public abstract IAttributePartType getType();
|
||||
}//IAttributePart//
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IAttributePartType extends IReferencePartType {
|
||||
}//IAttributePartType//
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.common.util.IHashMap;
|
||||
|
||||
public interface IBuilderDefinition {
|
||||
public static final String NODE_NAME = "builder";
|
||||
/**
|
||||
* Gets the codeLocation value.
|
||||
* @return The codeLocation value.
|
||||
*/
|
||||
public abstract String getCodeLocation();
|
||||
/**
|
||||
* Sets the codeLocation value.
|
||||
* @param codeLocation The codeLocation value.
|
||||
*/
|
||||
public abstract void setCodeLocation(String codeLocation);
|
||||
/**
|
||||
* Gets the collection of builder class names (java.lang.String) indexed by platform (BuilderDefinition.Platform).
|
||||
* @return The builder class name/platform mapping.
|
||||
*/
|
||||
public abstract IHashMap getPlatformTypeMap();
|
||||
}//IBuilderDefinition//
|
||||
@@ -0,0 +1,326 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2009 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.common.util.ICollection;
|
||||
import com.common.util.IList;
|
||||
import com.common.util.ISet;
|
||||
import com.foundation.util.IManagedList;
|
||||
import com.foundation.util.xml.IElement;
|
||||
import com.foundation.view.builder.IClassMetadataLoader;
|
||||
|
||||
public interface IComponentData extends IAbstractModel {
|
||||
public static final int SEARCH_FLAG_UP = 0x01; //Searches this & all children recursivly.//
|
||||
public static final int SEARCH_FLAG_DOWN = 0x02; //Searches this & all parents.//
|
||||
public static final int SEARCH_FLAG_FULL = 0x04; //Searches the entire tree from the ground up.//
|
||||
public static final int SEARCH_FLAG_SHALLOW = 0x08; //Searches only this component and immediate child components (not recursive).//
|
||||
public static final int SEARCH_FLAG_THIS = 0x10; //Searches only this component.//
|
||||
public static final int SEARCH_FLAG_STEP_DOWN = 0x20; //Searches this component and all sub-components, then steps down to the parent recursivly.//
|
||||
public static final int SEARCH_FLAG_DOWN_AND_SHALLOW = 0x40; //Searches this, all immediate children, all parents and all their immediate children.//
|
||||
/** This property is common to all components as must be visible to allow searching. */
|
||||
public static final String PROPERTY_NAME = "name";
|
||||
/** An alternative property to the name, but not useable for searching. This is used primarily for debugging. */
|
||||
public static final String PROPERTY_ID = "id";
|
||||
/**
|
||||
* Gets the view model that loaded this component.
|
||||
* @return The component's view model.
|
||||
*/
|
||||
public abstract IViewModel getViewModel();
|
||||
/**
|
||||
* Sets the view model that loaded this component.
|
||||
* @param viewModel The component's view model.
|
||||
*/
|
||||
public abstract void setViewModel(IViewModel viewModel);
|
||||
/**
|
||||
* Gets the component's type.
|
||||
* @return The component's type.
|
||||
*/
|
||||
public abstract IComponentType getComponentType();
|
||||
/**
|
||||
* Gets the component's parent.
|
||||
* @return The component's parent.
|
||||
*/
|
||||
public abstract IComponentData getParent();
|
||||
/**
|
||||
* Sets the component's parent.
|
||||
* @param parent The component's parent.
|
||||
*/
|
||||
public abstract void setParent(IComponentData parent);
|
||||
/**
|
||||
* Gets the property parts for the component.
|
||||
* Note that unlike the attributes, methods, and events, properties are fixed and thus every property type has exactly one property part in this list.
|
||||
* @return The properties for the component. Properteries without a value will still have a property part object, just a null value field.
|
||||
*/
|
||||
public abstract IManagedList getProperties();
|
||||
/**
|
||||
* Gets a named property.
|
||||
* @param name The name of the property to find.
|
||||
* @return The property metadata or null if the property with the given name does not exist.
|
||||
*/
|
||||
public abstract IPropertyPart getProperty(String name);
|
||||
/**
|
||||
* Gets a named property value.
|
||||
* @param name The name of the property to find.
|
||||
* @return The property value or null if the property with the given name does not exist.
|
||||
*/
|
||||
public abstract Object getPropertyValue(String name);
|
||||
/**
|
||||
* Gets a named property.
|
||||
* @param name The name of the property to find.
|
||||
* @return The property metadata or null if the property with the given name does not exist.
|
||||
*/
|
||||
public abstract boolean hasProperty(String name, Object value);
|
||||
/**
|
||||
* Sets the property value for the given property type.
|
||||
* @param type The property type whose value is to be set.
|
||||
* @param value The value in the form required by the property type.
|
||||
*/
|
||||
public abstract void setProperty(IPropertyPartType type, Object value);
|
||||
/**
|
||||
* Gets the association part metadatas for the given association function.
|
||||
* @param function The function of the association.
|
||||
* @return The association group part instance with the given function.
|
||||
*/
|
||||
public abstract IAssociationGroupPart getAssociations(String function);
|
||||
/**
|
||||
* Initializes and maps the association group for the given association part type.
|
||||
* @param type The metadata for the association function that associations will be defined for.
|
||||
* @return The container that houses the associations for the given association part type.
|
||||
*/
|
||||
public abstract IAssociationGroupPart addAssociationGroup(IAssociationPartType type, IElement documentElement);
|
||||
/**
|
||||
* Gets the association part metadatas for the given association function.
|
||||
* @param function The function of the association.
|
||||
* @return The list of association part instances with the given function.
|
||||
*/
|
||||
public IList getCollectingAssociations(String function);
|
||||
/**
|
||||
* Adds the association for the given association data.
|
||||
* @param type The association type whose value is to be set.
|
||||
* @param attributeName The name of the attribute as a standard java attribute name.
|
||||
* @param valueHolderName The name of the value holder whose held value will be used to get/set the attribute. This is required if the type is not multi, otherwise optional.
|
||||
* @param heldTypeName The qualified class name for the class which defines the association. This is only allowed (optional) if there is a value holder related to the association. This is never allowed for child associations (in a chain).
|
||||
* @param rowTypeName The qualified class name for the class which defines the referenced part, or if value holder related, the type of row which will be passed to the accessor methods. This must be non-null if this is a multi-association (multiple component items registered with the association). If this is a child association (chained) then this is the type of data passed to the association from the parent association.
|
||||
* @param applicationClassMetadataLoader The class metadata loader that can be used to load information about the application classes.
|
||||
* @param invertLogic Whether the boolean result should be inverted. This is ignored for associations that don't result in a boolean value.
|
||||
* @param documentElement The optional element of the document that defines this association. This is used for debugging.
|
||||
* @return The part that was added.
|
||||
*/
|
||||
public IAssociationPart addCollectingAssociation(IAssociationPartType type, String attributeName, String valueHolderName, String heldTypeName, String rowTypeName, IClassMetadataLoader applicationClassMetadataLoader, Boolean invertLogic, IElement documentElement);
|
||||
/**
|
||||
* Adds the association for the given association data.
|
||||
* @param type The association type whose value is to be set.
|
||||
* @param getterName The name of the method called to get the value(s).
|
||||
* @param getterSignature The signature (in class file format) of the method called to get the value(s). This should be null unless we are dealing with a multi-association tied to a value holder, in which case it should be the multi-association's row type or a super class of it.
|
||||
* @param setterName The name of the method called to set the value(s).
|
||||
* @param setterSignature The signature (in class file format) of the method called to set the value(s). This should always be the value type unless we are dealing with a multi-association tied to a value holder, in which case it should be both the value type and the multi-association's row type or super class of it.
|
||||
* @param eventName The name of the event fired when the value is changed and the component must re-get the value(s).
|
||||
* @param valueHolderName The name of the value holder whose held value will be used to get/set the attribute. This is required if the type is not multi, otherwise optional.
|
||||
* @param heldTypeName The qualified class name for the class which defines the association. This is only allowed (optional) if there is a value holder related to the association. This is never allowed for child associations (in a chain).
|
||||
* @param rowTypeName The qualified class name for the class which defines the referenced part, or if value holder related, the type of row which will be passed to the accessor methods. This must be non-null if this is a multi-association (multiple component items registered with the association). If this is a child association (chained) then this is the type of data passed to the association from the parent association.
|
||||
* @param invertLogic Whether the boolean result should be inverted. This is ignored for associations that don't result in a boolean value.
|
||||
* @param documentElement The optional element of the document that defines this association. This is used for debugging.
|
||||
* @return The part that was added.
|
||||
*/
|
||||
public IAssociationPart addCollectingAssociation(IAssociationPartType type, String getterName, String getterSignature, String setterName, String setterSignature, String valueHolderName, String heldTypeName, String rowTypeName, Boolean invertLogic, IElement documentElement);
|
||||
/**
|
||||
* Gets the attribute part metadata for the given attribute function.
|
||||
* @param function The function of the attribute.
|
||||
* @return The attribute part with the given function.
|
||||
*/
|
||||
public abstract IAttributePart getAttribute(String function);
|
||||
/**
|
||||
* Gets the attribute part metadatas for the given attribute function.
|
||||
* @param function The function of the attribute.
|
||||
* @return The list of attribute part instances with the given function.
|
||||
*/
|
||||
public abstract IList getAttributes(String function);
|
||||
/**
|
||||
* Sets the attribute value for the given attribute type.
|
||||
* @param type The attribute type whose value is to be set.
|
||||
* @param name The name of the attribute either as an identifier or standard java attribute name.
|
||||
* @param rowTypeName The qualified class name identifying which classes of row or data objects define the attribute.
|
||||
* @param documentElement The optional element of the document that defines this part. This is used for debugging.
|
||||
* @return The attribute part that was added, or null if there was a duplicate.
|
||||
*/
|
||||
public abstract IAttributePart setAttribute(IAttributePartType type, String name, String rowTypeName, IElement documentElement);
|
||||
/**
|
||||
* Sets the attribute value for the given attribute type.
|
||||
* @param type The attribute type whose value is to be set.
|
||||
* @param name The name of the attribute either as an identifier or standard java attribute name.
|
||||
* @param valueHolderName The optional name of the value holder whose held value will be used to get/set the attribute (if it defines it - which it must unless the value type name is specified).
|
||||
* @param heldTypeName The optional qualified class name identifying which class held by the value holder defines the attribute.
|
||||
* @param documentElement The optional element of the document that defines this part. This is used for debugging.
|
||||
* @return The attribute part that was added, or null if there was a duplicate.
|
||||
*/
|
||||
public abstract IAttributePart setAttribute(IAttributePartType type, String name, String valueHolderName, String heldTypeName, IElement documentElement);
|
||||
/**
|
||||
* Gets the method part metadata for the given method function.
|
||||
* @param function The function of the method.
|
||||
* @return The method part with the given function.
|
||||
*/
|
||||
public abstract IMethodPart getMethod(String function);
|
||||
/**
|
||||
* Gets the method part metadata for the given method function.
|
||||
* @param function The function of the method.
|
||||
* @return The list of method part instances with the given function.
|
||||
*/
|
||||
public abstract IList getMethods(String function);
|
||||
/**
|
||||
* Sets the method value for the given method type.
|
||||
* @param type The method type whose value is to be set.
|
||||
* @param name The name of the method without any brackets or signature.
|
||||
* @param valueHolderName The optional name of the value holder whose held value will be used to call the method (if it defines it - which it must unless the value type name is specified).
|
||||
* @param heldTypeName The optional qualified class name identifying which class defines the method (a subclass of the class defined by the value holder).
|
||||
* @param rowTypeName The optional qualified class name identifying which classes of row or data objects define the method.
|
||||
* @param signature The method signature in the class file format ex: Ljava.lang.ObjectI => (java.lang.Object, int).
|
||||
* @param documentElement The optional element of the document that defines this part. This is used for debugging.
|
||||
* @return The method part that was added, or null if there was a duplicate.
|
||||
*/
|
||||
public abstract IMethodPart setMethod(IMethodPartType type, String name, String valueHolderName, String heldTypeName, String rowTypeName, String signature, IElement documentElement);
|
||||
/**
|
||||
* Gets the key bindings for the component.
|
||||
* @return The component's key metadata.
|
||||
*/
|
||||
public abstract IList getKeys();
|
||||
/**
|
||||
* Sets the key value for the given key type.
|
||||
* @param type The key type whose value is to be set.
|
||||
* @param method The name of the method without any brackets or signature.
|
||||
* @param valueHolderName The optional name of the value holder whose held value will be used to call the method (if it defines it - which it must unless the value type name is specified).
|
||||
* @param heldTypeName The optional qualified class name identifying which class defines the method (a subclass of the class defined by the value holder).
|
||||
* @param rowTypeName The optional qualified class name identifying which classes of row or data objects define the method.
|
||||
* @param signature The method signature in the class file format ex: Ljava.lang.ObjectI => (java.lang.Object, int).
|
||||
* @param character The character code.
|
||||
* @param alt Whether the alt key modifies the character.
|
||||
* @param shift Whether the shift key modifies the character.
|
||||
* @param control Whether the control key modifies the character.
|
||||
* @param command Whether the command key modifies the character.
|
||||
* @param documentElement The optional element of the document that defines this part. This is used for debugging.
|
||||
* @return The key part that was added.
|
||||
*/
|
||||
public abstract IKeyPart setKey(IKeyPartType type, String method, String valueHolderName, String heldTypeName, String rowTypeName, String signature, Integer character, Boolean alt, Boolean shift, Boolean control, Boolean command, IElement documentElement);
|
||||
/**
|
||||
* Gets the event part metadata for the given event function.
|
||||
* @param function The function of the event.
|
||||
* @return The event part with the given function.
|
||||
*/
|
||||
public abstract IEventPart getEvent(String function);
|
||||
/**
|
||||
* Gets the collection of event part metadata for the given event function.
|
||||
* This method exists because some actions require multiple event listeners.
|
||||
* @param function The function of the event.
|
||||
* @return The list of event part instances with the given functon.
|
||||
*/
|
||||
public abstract IList getEvents(String function);
|
||||
/**
|
||||
* Sets the event for the given event type. For event types allowing multiple event parts this may add an event part to the collection.
|
||||
* @param type The event type whose value is to be set.
|
||||
* @param name The name of the event either as an identifier or standard java attribute name.
|
||||
* @param valueHolderName The optional name of the value holder whose held value will be used to listen to the event (if it defines it - which it must unless the value type name is specified).
|
||||
* @param heldTypeName The optional qualified class name identifying which class defines the event (a subclass of the class defined by the value holder).
|
||||
* @param rowTypeName The optional qualified class name identifying which classes of row or data objects define the event.
|
||||
* @param documentElement The optional element of the document that defines this part. This is used for debugging.
|
||||
* @return The event part that was added.
|
||||
*/
|
||||
public abstract IEventPart setEvent(IEventPartType type, String name, String valueHolderName, String heldTypeName, String rowTypeName, IElement documentElement);
|
||||
/**
|
||||
* Gets the collection of event part metadata for the given event function.
|
||||
* This method exists because some actions require multiple event listeners.
|
||||
* @param function The function of the event.
|
||||
* @return The list of event part instances with the given functon.
|
||||
*/
|
||||
public abstract IList getLinks(String function);
|
||||
/**
|
||||
* Sets the link for the given link type.
|
||||
* @param type The event type whose value is to be set.
|
||||
* @param targetComponentName The name of the linked component.
|
||||
* @param targetName The targeted component's target name for the link.
|
||||
* @param data The optional source code to generate data required by the target link (only when the source link does not provide data and the target link's data expectation can be static).
|
||||
* @param invertLogic Whether the link should invert boolean data.
|
||||
* @param nullValue The value to use for the link when the input is null. This should default to 'false'.
|
||||
* @param documentElement The optional element of the document that defines this part. This is used for debugging.
|
||||
* @return The link part that was added.
|
||||
*/
|
||||
public abstract ILinkPart setLink(ILinkPartType type, String targetComponentName, String targetName, String data, Boolean invertLogic, Boolean nullValue, IElement documentElement);
|
||||
/**
|
||||
* Gets the components value.
|
||||
* @return The components value.
|
||||
*/
|
||||
public abstract IManagedList getComponents();
|
||||
/**
|
||||
* Gets the first component that implements or inherits from the given component type name.
|
||||
* @param componentTypeName The name of the component type.
|
||||
* @param checkInheritance Whether the type name should be compared against the component's immediate type, or that and all inherited types.
|
||||
* @return The first component data located with the given type.
|
||||
*/
|
||||
public abstract IComponentData getComponent(String componentTypeName, boolean checkInheritance);
|
||||
/**
|
||||
* Searches for all matching components.
|
||||
* @param results The optional collection to which the matches will be added.
|
||||
* @param componentTypeName The value of the component's type name.
|
||||
* @param searchFlags Some combination of the flags defined by this class beginning with 'SEARCH_FLAG_'.
|
||||
* @param ignored An optional component to be ignored.
|
||||
* @return The components located fitting the given description, or empty if none were found.
|
||||
*/
|
||||
public abstract ICollection searchForComponents(ICollection results, String componentTypeName, int searchFlags, IComponentData ignored);
|
||||
/**
|
||||
* Searches for the first component to be found matching the given description.
|
||||
* @param componentName The optional value of the component's name property. This must be specified only if the type name is not.
|
||||
* @param componentTypeName The optional value of the component's type name. This must be specified only if the name property is not.
|
||||
* @param searchFlags Some combination of the flags defined by this class beginning with 'SEARCH_FLAG_'.
|
||||
* @return The first component located fitting the given description, or null if none was found.
|
||||
*/
|
||||
public abstract IComponentData searchForComponent(String componentName, String componentTypeName, int searchFlags);
|
||||
/**
|
||||
* Gets all components that implement or inherit from the given component type name.
|
||||
* @param components A collection that will contain the results of the search.
|
||||
* @param componentTypeName The name of the component type.
|
||||
* @param checkInheritance Whether the type name should be compared against the component's immediate type, or that and all inherited types.
|
||||
*/
|
||||
public abstract void getComponents(ICollection components, String componentTypeName, boolean checkInheritance);
|
||||
/**
|
||||
* Gets the collection of styles.
|
||||
* @return The set of all styles.
|
||||
*/
|
||||
public abstract ISet getStyles();
|
||||
/**
|
||||
* Gets the component's name as defined by the user.
|
||||
* <p>Note: This may be null or empty as it is an optional parameter useful only for debugging.</p>
|
||||
* <p>Note: The name is used to name identifiers in the java source. If a name is not available a unique substitute should be used.</p>
|
||||
* @return The component's name which allows the user to refer to the component when reading error output from the code generator.
|
||||
*/
|
||||
public abstract String getName();
|
||||
/**
|
||||
* Sets the component's name as defined by the user.
|
||||
* <p>Note: This may be null or empty as it is an optional parameter useful primarily for debugging.</p>
|
||||
* <p>Note: The name is used to name identifiers in the java source. If a name is not available a unique substitute should be used.</p>
|
||||
* @param name The component's name which allows the user to refer to the component when reading error output from the code generator.
|
||||
*/
|
||||
public abstract void setName(String name);
|
||||
/**
|
||||
* Gets the comments for the component data.
|
||||
* @return The set of xml comments that occured just prior to the component's tag.
|
||||
*/
|
||||
public abstract String[] getComments();
|
||||
/**
|
||||
* Sets the comments for the component data.
|
||||
* @param comments The set of xml comments that occured just prior to the component's tag.
|
||||
*/
|
||||
public abstract void setComments(String[] comments);
|
||||
/**
|
||||
* Gets the text that exists inside the component's tag.
|
||||
* @return The text for the component.
|
||||
*/
|
||||
public abstract String getText();
|
||||
/**
|
||||
* Sets the text that exists inside the component's tag.
|
||||
* @param text The text for the component.
|
||||
*/
|
||||
public abstract void setText(String text);
|
||||
}//IComponentData//
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IComponentPartType extends IAbstractModel {
|
||||
public static final String NODE_NAME = "component";
|
||||
/**
|
||||
* Gets the component type name.
|
||||
* @return The component type name.
|
||||
*/
|
||||
public abstract String getType();
|
||||
/**
|
||||
* Sets the component type name.
|
||||
* @param type The component type name.
|
||||
*/
|
||||
public abstract void setType(String type);
|
||||
/**
|
||||
* Determines whether the attribute must be present.
|
||||
* @return Whether the attribute must be specified.
|
||||
*/
|
||||
public abstract Boolean getRequired();
|
||||
/**
|
||||
* Determines whether the component must be present.
|
||||
* @param required Whether the component must be specified.
|
||||
*/
|
||||
public abstract void setRequired(Boolean required);
|
||||
/**
|
||||
* Determines whether multiple entries of the given component are allowed.
|
||||
* @return Whether multiple components of the given type may be specified.
|
||||
*/
|
||||
public abstract Boolean getMultiple();
|
||||
/**
|
||||
* Determines whether multiple entries of the given component are allowed.
|
||||
* @param required Whether multiple components of the given type may be specified.
|
||||
*/
|
||||
public abstract void setMultiple(Boolean multiple);
|
||||
/**
|
||||
* Gets the component's property name that must be unique for each contained component of this type.
|
||||
* @return The optional name of the component type's property that must be unique.
|
||||
*/
|
||||
public abstract String getUniqueProperty();
|
||||
/**
|
||||
* Sets the component's property name that must be unique for each contained component of this type.
|
||||
* @param uniqueProperty The optional name of the component type's property that must be unique.
|
||||
*/
|
||||
public abstract void setUniqueProperty(String uniqueProperty);
|
||||
}//IComponentPartType//
|
||||
@@ -0,0 +1,213 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.common.util.IHashSet;
|
||||
import com.common.util.IList;
|
||||
import com.foundation.util.IManagedList;
|
||||
|
||||
public interface IComponentType extends IAbstractModel {
|
||||
public static final String NODE_NAME = "type";
|
||||
/**
|
||||
* Determines whether this type extends the given type.
|
||||
* @param type The potential super type.
|
||||
* @return Whether the passed type is a sub-type of this type. Note: This method does not check to see if this type is the passed type.
|
||||
*/
|
||||
public abstract boolean extendsType(IComponentType type);
|
||||
/**
|
||||
* Gets the name value.
|
||||
* @return The name value.
|
||||
*/
|
||||
public abstract String getName();
|
||||
/**
|
||||
* Gets the builderDefinition value.
|
||||
* @return The builderDefinition value.
|
||||
*/
|
||||
public abstract IBuilderDefinition getBuilderDefinition();
|
||||
/**
|
||||
* Gets the properties value.
|
||||
* @return The properties value.
|
||||
*/
|
||||
public abstract IManagedList getProperties();
|
||||
/**
|
||||
* A convience method to search for a named property.
|
||||
* @param name The name of the property.
|
||||
* @return The property matching the name, or null if none was found.
|
||||
*/
|
||||
public abstract IPropertyPartType getProperty(String name);
|
||||
/**
|
||||
* Gets the collection of all association part types defined for this component.
|
||||
* @return The associations for this component.
|
||||
*/
|
||||
public abstract IManagedList getAssociations();
|
||||
/**
|
||||
* A convience method to search for an association given the association's function.
|
||||
* @param function The function of the association.
|
||||
* @return The association matching the function, or null if none was found.
|
||||
*/
|
||||
public abstract IAssociationPartType getAssociation(String function);
|
||||
/**
|
||||
* Gets the attributes.
|
||||
* @return The collection of AttributePartTypes defined by the component type.
|
||||
*/
|
||||
public abstract IManagedList getAttributes();
|
||||
/**
|
||||
* A convience method to search for an attribute given the attribute's function.
|
||||
* @param function The function of the attribute.
|
||||
* @return The attribute matching the function, or null if none was found.
|
||||
*/
|
||||
public abstract IAttributePartType getAttribute(String function);
|
||||
/**
|
||||
* Gets the methods.
|
||||
* @return The collection of MethodPartTypes defined by the component type.
|
||||
*/
|
||||
public abstract IManagedList getMethods();
|
||||
/**
|
||||
* A convience method to search for an method given the method's function.
|
||||
* @param function The function of the method.
|
||||
* @return The method matching the function, or null if none was found.
|
||||
*/
|
||||
public abstract IMethodPartType getMethod(String function);
|
||||
/**
|
||||
* Gets the events.
|
||||
* @return The collection of LinkagePartTypes defined by the component type.
|
||||
*/
|
||||
public abstract IManagedList getEvents();
|
||||
/**
|
||||
* A convience method to search for an event given the event's function.
|
||||
* @param function The function of the event.
|
||||
* @return The event matching the function, or null if none was found.
|
||||
*/
|
||||
public abstract IEventPartType getEvent(String function);
|
||||
/**
|
||||
* Gets the links.
|
||||
* @return The collection of LinkPartTypes defined by the component type.
|
||||
*/
|
||||
public abstract IManagedList getLinks();
|
||||
/**
|
||||
* A convience method to search for a link given the link's function.
|
||||
* @param function The function for the link.
|
||||
* @return The link matching the function, or null if none was found.
|
||||
*/
|
||||
public abstract ILinkPartType getLink(String function);
|
||||
/**
|
||||
* Gets the links.
|
||||
* @return The collection of LinkPartTypes defined by the component type.
|
||||
*/
|
||||
public abstract IManagedList getLinkTargets();
|
||||
/**
|
||||
* A convience method to search for a link target given the link's name and data type.
|
||||
* @param name The name to search for.
|
||||
* @param dataType The data type to search for.
|
||||
* @return The link matching the function, or null if none was found.
|
||||
*/
|
||||
public abstract ILinkTargetPartType getLinkTarget(String name, String dataType);
|
||||
/**
|
||||
* Gets the key part type.
|
||||
* @return The key part type if key bindings are allowed by the component.
|
||||
*/
|
||||
public abstract IKeyPartType getKey();
|
||||
/**
|
||||
* Gets the components value.
|
||||
* @return The components value.
|
||||
*/
|
||||
public abstract IManagedList getComponents();
|
||||
/**
|
||||
* Gets the component types that were defined inside this component type.
|
||||
* @return The component type metadata for types defined by this component type.
|
||||
*/
|
||||
public abstract IManagedList getDefinedComponentTypes();
|
||||
/**
|
||||
* Gets the component type defined within this component type or any of this component type's parent types or defining types.
|
||||
* @param typeName The name of the type.
|
||||
* @return The component type object, or null if none by the given name was found.
|
||||
*/
|
||||
public abstract IComponentType getDefinedComponentType(String typeName);
|
||||
/**
|
||||
* Gets the extendedTypeName value.
|
||||
* @return The extendedTypeName value.
|
||||
*/
|
||||
public abstract String getExtendedTypeName();
|
||||
/**
|
||||
* Gets the extendedType value.
|
||||
* @return The extendedType value.
|
||||
*/
|
||||
public abstract IComponentType getExtendedType();
|
||||
/**
|
||||
* Sets the extendedType value.
|
||||
* @param extendedType The extendedType value.
|
||||
*/
|
||||
public abstract void setExtendedType(IComponentType extendedType);
|
||||
/**
|
||||
* Gets the associatedType value.
|
||||
* This is optional for most types. It is currently only used by layout types.
|
||||
* @return The associatedType value.
|
||||
*/
|
||||
public abstract IComponentType getAssociatedType();
|
||||
/**
|
||||
* Sets the associatedType value.
|
||||
* This is optional for most types. It is currently only used by layout types.
|
||||
* @param associatedType The associatedType value.
|
||||
*/
|
||||
public abstract void setAssociatedType(IComponentType associatedType);
|
||||
/**
|
||||
* Gets the associatedTypeName value.
|
||||
* This is optional for most types. It is currently only used by layout types.
|
||||
* @return The associatedTypeName value.
|
||||
*/
|
||||
public abstract String getAssociatedTypeName();
|
||||
/**
|
||||
* Gets the definingType value.
|
||||
* This is optional for most types. It creates a link with the type that defines this type to allow proper type searches.
|
||||
* @return The definingType value.
|
||||
*/
|
||||
public abstract IComponentType getDefiningType();
|
||||
/**
|
||||
* Sets the definingType value.
|
||||
* This is optional for most types. It creates a link with the type that defines this type to allow proper type searches.
|
||||
* @param definingType The definingType value.
|
||||
*/
|
||||
public abstract void setDefiningType(IComponentType definingType);
|
||||
/**
|
||||
* Gets the collection of styles.
|
||||
* @return The list of all styles.
|
||||
*/
|
||||
public abstract IList getStyles();
|
||||
/**
|
||||
* Gets the collection of styles declared by the type.
|
||||
* @return The list of all styles declared by this type only.
|
||||
*/
|
||||
public abstract IList getDeclaredStyles();
|
||||
/**
|
||||
* Determines whether the super type's styles will be inherited.
|
||||
* @return Whether to inherit the super type's styles.
|
||||
*/
|
||||
public abstract Boolean getInheritStyles();
|
||||
/**
|
||||
* Gets the collection of style sets which are predefined settings for the styles.
|
||||
* This can be optionally used by view builders to provide shortcuts.
|
||||
* @return The list of all style sets.
|
||||
*/
|
||||
public abstract IList getStyleSets();
|
||||
/**
|
||||
* Gets the collection of declared style sets which are predefined settings for the styles.
|
||||
* This can be optionally used by view builders to provide shortcuts.
|
||||
* @return The list of all declared style ets.
|
||||
*/
|
||||
public abstract IList getDeclaredStyleSets();
|
||||
/**
|
||||
* Gets the child component types (those extending this component type).
|
||||
* @return The component types that extend this type.
|
||||
*/
|
||||
public IManagedList getChildTypes();
|
||||
/**
|
||||
* Collects all type names for the base type and all child types.
|
||||
* @return The set of all type names.
|
||||
*/
|
||||
public IHashSet collectTypeNames();
|
||||
}//IComponentType//
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IEventPart extends IReferencePart {
|
||||
/**
|
||||
* Gets the type value.
|
||||
* @return The type value.
|
||||
*/
|
||||
public abstract IEventPartType getType();
|
||||
}//IEventPart//
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IEventPartType extends IReferencePartType {
|
||||
}//IEventPartType//
|
||||
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.view.builder.IClassMetadataLoader;
|
||||
|
||||
public interface IKeyPart extends IAbstractPart {
|
||||
public static final String ATTRIBUTE_VALUE_HOLDER_NAME = "value-holder";
|
||||
public static final String ATTRIBUTE_HELD_TYPE_NAME = "value-type";
|
||||
public static final String ATTRIBUTE_ROW_TYPE_NAME = "row-type";
|
||||
public static final String ATTRIBUTE_METHOD = "method";
|
||||
public static final String ATTRIBUTE_SIGNATURE = "signature";
|
||||
public static final String ATTRIBUTE_CHARACTER = "character";
|
||||
public static final String ATTRIBUTE_ALT = "alt";
|
||||
public static final String ATTRIBUTE_SHIFT = "shift";
|
||||
public static final String ATTRIBUTE_CONTROL = "control";
|
||||
public static final String ATTRIBUTE_COMMAND = "command";
|
||||
/**
|
||||
* Gets the type value.
|
||||
* @return The type value.
|
||||
*/
|
||||
public abstract IKeyPartType getType();
|
||||
/**
|
||||
* Gets the signature value.
|
||||
* @return The signature value.
|
||||
*/
|
||||
public abstract String getSignature();
|
||||
/**
|
||||
* Sets the signature value.
|
||||
* @param signature The signature value.
|
||||
*/
|
||||
public abstract void setSignature(String signature);
|
||||
/**
|
||||
* Gets the method for the key part.
|
||||
* @return The method name.
|
||||
*/
|
||||
public abstract String getMethod();
|
||||
/**
|
||||
* Sets the method for the key part.
|
||||
* @param method The method name.
|
||||
*/
|
||||
public abstract void setMethod(String method);
|
||||
/**
|
||||
* Gets the character for the key part.
|
||||
* @return The character.
|
||||
*/
|
||||
public abstract Integer getCharacter();
|
||||
/**
|
||||
* Sets the character for the key part.
|
||||
* @param code The character.
|
||||
*/
|
||||
public abstract void setCharacter(Integer character);
|
||||
/**
|
||||
* Gets whether the alt key modifies the character.
|
||||
* @return Whether the alt key is used as a modifier.
|
||||
*/
|
||||
public abstract Boolean getAlt();
|
||||
/**
|
||||
* Sets whether the alt key modifies the character.
|
||||
* @param alt Whether the alt key is used as a modifier.
|
||||
*/
|
||||
public abstract void setAlt(Boolean alt);
|
||||
/**
|
||||
* Gets whether the shift key modifies the character.
|
||||
* @return Whether the shift key is used as a modifier.
|
||||
*/
|
||||
public abstract Boolean getShift();
|
||||
/**
|
||||
* Sets whether the shift key modifies the character.
|
||||
* @param shift Whether the shift key is used as a modifier.
|
||||
*/
|
||||
public abstract void setShift(Boolean shift);
|
||||
/**
|
||||
* Gets whether the control key modifies the character.
|
||||
* @return Whether the control key is used as a modifier.
|
||||
*/
|
||||
public abstract Boolean getControl();
|
||||
/**
|
||||
* Sets whether the control key modifies the character.
|
||||
* @param control Whether the control key is used as a modifier.
|
||||
*/
|
||||
public abstract void setControl(Boolean control);
|
||||
/**
|
||||
* Gets whether the command key modifies the character.
|
||||
* @return Whether the command key is used as a modifier.
|
||||
*/
|
||||
public abstract Boolean getCommand();
|
||||
/**
|
||||
* Sets whether the command key modifies the character.
|
||||
* @param command Whether the command key is used as a modifier.
|
||||
*/
|
||||
public abstract void setCommand(Boolean command);
|
||||
/**
|
||||
* Gets the name of the value holder associated with the part.
|
||||
* The value holder's held type defines the part if the value type name is null.
|
||||
* @return The the name of the value holder.
|
||||
*/
|
||||
public abstract String getValueHolderName();
|
||||
/**
|
||||
* Sets the name of the value holder associated with the part.
|
||||
* The value holder's held type defines the part if the value type name is null.
|
||||
* @param valueHolderName The the name of the value holder.
|
||||
*/
|
||||
public abstract void setValueHolderName(String valueHolderName);
|
||||
/**
|
||||
* Gets the qualified class name for the class of value held by the value holder for which this reference is valid.
|
||||
* @return The the qualified class name.
|
||||
*/
|
||||
public abstract String getHeldTypeName();
|
||||
/**
|
||||
* Sets the qualified class name for the class of value held by the value holder for which this reference is valid.
|
||||
* @param heldTypeName The the qualified class name.
|
||||
*/
|
||||
public abstract void setHeldTypeName(String heldTypeName);
|
||||
/**
|
||||
* Gets the qualified class name defining which row or data objects this reference is good for.
|
||||
* @return The the qualified class name.
|
||||
*/
|
||||
public abstract String getRowTypeName();
|
||||
/**
|
||||
* Sets the qualified class name defining which row or data objects this reference is good for.
|
||||
* @param rowTypeName The the qualified class name.
|
||||
*/
|
||||
public abstract void setRowTypeName(String rowTypeName);
|
||||
/**
|
||||
* Gets the modifiers as an integer.
|
||||
* @return The modifiers condensed.
|
||||
*/
|
||||
public int getModifiers();
|
||||
/**
|
||||
* Gets the method's return type's qualified name.
|
||||
* @param applicationClassMetadataLoader The class metadata loader to use when loading application class metadata.
|
||||
* @return The class for the method return value.
|
||||
* @throws ClassNotFoundException Thrown if the value holder's held type is invalid or not available.
|
||||
*/
|
||||
public abstract String getMethodReturnType(IClassMetadataLoader applicationClassMetadataLoader) throws ClassNotFoundException;
|
||||
}//IKeyPart//
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IKeyPartType extends IAbstractModel {
|
||||
public static final String NODE_NAME = "key";
|
||||
/**
|
||||
* Gets whether the key binding must specify a value holder.
|
||||
* @return Whether a value holder is required to be specified.
|
||||
*/
|
||||
public abstract Boolean getRequiresValueHolder();
|
||||
/**
|
||||
* Sets whether the key binding must specify a value holder.
|
||||
* @param requiresValueHolder Whether a value holder is required to be specified.
|
||||
*/
|
||||
public abstract void setRequiresValueHolder(Boolean requiresValueHolder);
|
||||
}//IKeyPartType//
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2009 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface ILinkPart extends IAbstractPart {
|
||||
public static final String NODE_NAME = "link";
|
||||
public static final String ATTRIBUTE_FUNCTION = "function";
|
||||
public static final String ATTRIBUTE_COMPONENT = "component";
|
||||
public static final String ATTRIBUTE_TARGET = "target";
|
||||
public static final String ATTRIBUTE_DATA = "data";
|
||||
public static final String ATTRIBUTE_INVERT_LOGIC = "invert-logic";
|
||||
public static final String NULL_VALUE = "null-value";
|
||||
/**
|
||||
* Gets the type.
|
||||
* @return The type for this part.
|
||||
*/
|
||||
public abstract ILinkPartType getType();
|
||||
/**
|
||||
* Gets the name of the linked component.
|
||||
* @return The name of the component this link is bound to.
|
||||
*/
|
||||
public abstract String getTargetComponentName();
|
||||
/**
|
||||
* Sets the name of the linked component.
|
||||
* @param targetComponentName The name of the component this link is bound to.
|
||||
*/
|
||||
public abstract void setTargetComponentName(String targetComponentName);
|
||||
/**
|
||||
* Gets the target name.
|
||||
* @return The name of the link-target on the targeted component.
|
||||
*/
|
||||
public abstract String getTargetName();
|
||||
/**
|
||||
* Sets the target name.
|
||||
* @param targetName The name of the link-target on the targeted component.
|
||||
*/
|
||||
public abstract void setTargetName(String targetName);
|
||||
/**
|
||||
* Gets the optional static data (source code) passed when the link is invoked.
|
||||
* An example might be Boolean.TRUE if the target link requires a java.lang.Boolean data object, or new Integer(0) if the target requires a java.lang.Integer.
|
||||
* @return The optional data passed if the linking component does not provide the data and the linked component requires data which can be static.
|
||||
*/
|
||||
public abstract String getData();
|
||||
/**
|
||||
* Sets the optional static data passed when the link is invoked.
|
||||
* An example might be Boolean.TRUE if the target link requires a java.lang.Boolean data object, or new Integer(0) if the target requires a java.lang.Integer.
|
||||
* @param data The optional data passed if the linking component does not provide the data and the linked component requires data which can be static.
|
||||
*/
|
||||
public abstract void setData(String data);
|
||||
/**
|
||||
* Gets whether the link should invert boolean data.
|
||||
* <p>This is only allowed (it is optional) for links which target a type of java.lang.Boolean.</p>
|
||||
* @return Whether the boolean data should be inverted.
|
||||
*/
|
||||
public abstract Boolean getInvertLogic();
|
||||
/**
|
||||
* Sets whether the link should invert boolean data.
|
||||
* <p>This is only allowed (it is optional) for links which target a type of java.lang.Boolean.</p>
|
||||
* @param invertLogic Whether the boolean data should be inverted.
|
||||
*/
|
||||
public abstract void setInvertLogic(Boolean invertLogic);
|
||||
/**
|
||||
* Gets the boolean value used if the input is null. The inverse of this should be used if the value is non-null and non-boolean.
|
||||
* <p>This is only allowed (it is optional) for links which target a type of java.lang.Boolean.</p>
|
||||
* @return The value used when the input is null.
|
||||
*/
|
||||
public abstract Boolean getNullValue();
|
||||
/**
|
||||
* Sets the boolean value used if the input is null. The inverse of this should be used if the value is non-null and non-boolean.
|
||||
* <p>This is only allowed (it is optional) for links which target a type of java.lang.Boolean.</p>
|
||||
* @param nullValue The value used when the input is null.
|
||||
*/
|
||||
public abstract void setNullValue(Boolean nullValue);
|
||||
}//ILinkPart//
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface ILinkPartType extends IAbstractModel {
|
||||
public static final String NODE_NAME = "link-source";
|
||||
public static final String ATTRIBUTE_FUNCTION = "function";
|
||||
public static final String ATTRIBUTE_DATA_TYPE = "data-type";
|
||||
/**
|
||||
* Gets the function name.
|
||||
* @return The function name.
|
||||
*/
|
||||
public abstract String getFunction();
|
||||
/**
|
||||
* Sets the function name.
|
||||
* @param function The function name.
|
||||
*/
|
||||
public abstract void setFunction(String function);
|
||||
/**
|
||||
* Gets the data type name.
|
||||
* @return The data type name.
|
||||
*/
|
||||
public abstract String getDataType();
|
||||
/**
|
||||
* Sets the data type name.
|
||||
* @param dataType The data type name.
|
||||
*/
|
||||
public abstract void setDataType(String dataType);
|
||||
}//ILinkPartType//
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface ILinkTargetPartType extends IAbstractModel {
|
||||
public static final String NODE_NAME = "link-target";
|
||||
public static final String ATTRIBUTE_NAME = "name";
|
||||
public static final String ATTRIBUTE_DATA_TYPE = "data-type";
|
||||
/**
|
||||
* Gets the target name.
|
||||
* @return The target's name.
|
||||
*/
|
||||
public abstract String getName();
|
||||
/**
|
||||
* Sets the target name.
|
||||
* @param name The target's name.
|
||||
*/
|
||||
public abstract void setName(String name);
|
||||
/**
|
||||
* Gets the data type name.
|
||||
* @return The data type name.
|
||||
*/
|
||||
public abstract String getDataType();
|
||||
/**
|
||||
* Sets the data type name.
|
||||
* @param dataType The data type name.
|
||||
*/
|
||||
public abstract void setDataType(String dataType);
|
||||
}//LinkTargetPartType//
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.view.builder.IClassMetadataLoader;
|
||||
|
||||
public interface IMethodPart extends IReferencePart {
|
||||
public static final String ATTRIBUTE_SIGNATURE = "signature";
|
||||
/**
|
||||
* Gets the method's return type's qualified name using java source notation.
|
||||
* @param applicationClassMetadataLoader The class metadata loader to use when loading application class metadata.
|
||||
* @return The class for the method return value.
|
||||
*/
|
||||
public abstract String getMethodReturnType(IClassMetadataLoader applicationClassMetadataLoader);
|
||||
/**
|
||||
* Gets the method's parameter types as an array of class names using java source notation.
|
||||
* @return The class for the method return value.
|
||||
*/
|
||||
public abstract String[] getMethodParameterTypes();
|
||||
/**
|
||||
* Gets the type value.
|
||||
* @return The type value.
|
||||
*/
|
||||
public abstract IMethodPartType getType();
|
||||
/**
|
||||
* Gets the signature value.
|
||||
* @return The signature value.
|
||||
*/
|
||||
public abstract String getSignature();
|
||||
/**
|
||||
* Sets the signature value.
|
||||
* @param signature The signature value.
|
||||
*/
|
||||
public abstract void setSignature(String signature);
|
||||
}//IMethodPart//
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IMethodPartType extends IReferencePartType {
|
||||
public static final String NODE_NAME = "method";
|
||||
}//IMethodPartType//
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IPlatform extends IAbstractModel {
|
||||
/**
|
||||
* Gets the architectureType value.
|
||||
* @return The architectureType value.
|
||||
*/
|
||||
public abstract String getArchitectureType();
|
||||
/**
|
||||
* Gets the windowSystem value.
|
||||
* @return The windowSystem value.
|
||||
*/
|
||||
public abstract String getWindowSystem();
|
||||
/**
|
||||
* Gets the componentTypeName value.
|
||||
* @return The componentTypeName value.
|
||||
*/
|
||||
public abstract String getComponentTypeName();
|
||||
/**
|
||||
* Gets the containerTypeName value.
|
||||
* @return The containerTypeName value.
|
||||
*/
|
||||
public abstract String getContainerTypeName();
|
||||
}//IPlatform//
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IPropertyPart extends IAbstractModel {
|
||||
/**
|
||||
* Gets the value value.
|
||||
* @return The value value.
|
||||
*/
|
||||
public abstract Object getValue();
|
||||
/**
|
||||
* Sets the value value.
|
||||
* @param value The value value.
|
||||
*/
|
||||
public abstract void setValue(Object value);
|
||||
/**
|
||||
* Gets the type value.
|
||||
* @return The type value.
|
||||
*/
|
||||
public abstract IPropertyPartType getType();
|
||||
/**
|
||||
* Sets the type value.
|
||||
* @param type The type value.
|
||||
*/
|
||||
public abstract void setType(IPropertyPartType type);
|
||||
}//IPropertyPart//
|
||||
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2009 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import com.common.util.IList;
|
||||
|
||||
public interface IPropertyPartType extends IAbstractModel {
|
||||
public static final DateFormat DEFAULT_DATE_FORMAT = SimpleDateFormat.getDateTimeInstance();
|
||||
|
||||
public static final String NODE_NAME = "property";
|
||||
public static final String TYPE_TEXT_UNKOWN = "unknown";
|
||||
public static final String TYPE_TEXT_STRING = "string";
|
||||
public static final String TYPE_TEXT_INTEGER = "integer";
|
||||
public static final String TYPE_TEXT_POSITIVE_INTEGER = "positive-integer";
|
||||
public static final String TYPE_TEXT_BOOLEAN = "boolean";
|
||||
public static final String TYPE_TEXT_COLOR = "color";
|
||||
public static final String TYPE_TEXT_FONT = "font";
|
||||
public static final String TYPE_TEXT_IMAGE = "image";
|
||||
public static final String TYPE_TEXT_LONG = "long";
|
||||
public static final String TYPE_TEXT_POSITIVE_LONG = "positive-long";
|
||||
public static final String TYPE_TEXT_FLOAT = "float";
|
||||
public static final String TYPE_TEXT_POSITIVE_FLOAT = "positive-float";
|
||||
public static final String TYPE_TEXT_DOUBLE = "double";
|
||||
public static final String TYPE_TEXT_POSITIVE_DOUBLE = "positive-double";
|
||||
public static final String TYPE_TEXT_BIG_DECIMAL = "big-decimal";
|
||||
public static final String TYPE_TEXT_CHARACTER = "character";
|
||||
public static final String TYPE_TEXT_DATE = "date";
|
||||
public static final String TYPE_TEXT_TYPE = "type";
|
||||
public static final String TYPE_TEXT_GRADIENT = "gradient";
|
||||
public static final String TYPE_TEXT_IMAGES = "images";
|
||||
|
||||
public static final int TYPE_UNKNOWN = 0;
|
||||
public static final int TYPE_STRING = 1;
|
||||
public static final int TYPE_INTEGER = 2;
|
||||
public static final int TYPE_POSITIVE_INTEGER = 3;
|
||||
public static final int TYPE_BOOLEAN = 4;
|
||||
public static final int TYPE_COLOR = 5;
|
||||
public static final int TYPE_FONT = 6;
|
||||
public static final int TYPE_IMAGE = 7; //Note: The image type converts to a string.//
|
||||
public static final int TYPE_LONG = 8;
|
||||
public static final int TYPE_POSITIVE_LONG = 9;
|
||||
public static final int TYPE_FLOAT = 10;
|
||||
public static final int TYPE_POSITIVE_FLOAT = 11;
|
||||
public static final int TYPE_DOUBLE = 12;
|
||||
public static final int TYPE_POSITIVE_DOUBLE = 13;
|
||||
public static final int TYPE_BIG_DECIMAL = 14;
|
||||
public static final int TYPE_CHARACTER = 15;
|
||||
public static final int TYPE_DATE = 16;
|
||||
public static final int TYPE_TYPE = 17;
|
||||
public static final int TYPE_GRADIENT = 18;
|
||||
public static final int TYPE_IMAGES = 19;
|
||||
/**
|
||||
* Converts the string value into the proper type for the property definition.
|
||||
* @param value The string value.
|
||||
* @return The value in the form of the property type.
|
||||
*/
|
||||
public abstract Object convert(String value);
|
||||
/**
|
||||
* Gets the name value.
|
||||
* @return The name value.
|
||||
*/
|
||||
public abstract String getName();
|
||||
/**
|
||||
* Sets the name value.
|
||||
* @param name The name value.
|
||||
*/
|
||||
public abstract void setName(String name);
|
||||
/**
|
||||
* Gets the type value.
|
||||
* @return The type value.
|
||||
*/
|
||||
public abstract Integer getType();
|
||||
/**
|
||||
* Sets the type value.
|
||||
* @param type The type value.
|
||||
*/
|
||||
public abstract void setType(String type);
|
||||
/**
|
||||
* Sets the type value.
|
||||
* @param type The type value.
|
||||
*/
|
||||
public abstract void setType(int type);
|
||||
/**
|
||||
* Gets whether the property is a list or array of values (zero or more).
|
||||
* @return Whether the property should have a set of values instead of a single value.
|
||||
*/
|
||||
public abstract Boolean getIsList();
|
||||
/**
|
||||
* Sets whether the property is a list or array of values (zero or more).
|
||||
* @param isList Whether the property should have a set of values instead of a single value.
|
||||
*/
|
||||
public abstract void setIsList(Boolean isList);
|
||||
/**
|
||||
* Gets the required value.
|
||||
* @return The required value.
|
||||
*/
|
||||
public abstract Boolean getRequired();
|
||||
/**
|
||||
* Sets the required value.
|
||||
* @param required The required value.
|
||||
*/
|
||||
public abstract void setRequired(Boolean required);
|
||||
/**
|
||||
* Gets whether the property value can be a resource reference.
|
||||
* @return Whether a resource reference to a value may be used.
|
||||
*/
|
||||
public abstract Boolean getAllowResource();
|
||||
/**
|
||||
* Sets whether the property value can be a resource reference.
|
||||
* @param allowResource Whether a resource reference to a value may be used.
|
||||
*/
|
||||
public abstract void setAllowResource(Boolean allowResource);
|
||||
/**
|
||||
* Gets the optional default value.
|
||||
* @return The optional default value of the correct type.
|
||||
*/
|
||||
public abstract Object getDefaultValue();
|
||||
/**
|
||||
* Sets the optional default value. This value must be of the type specified by the type attribute.
|
||||
* @param defaultValue The optional default value of the correct type.
|
||||
*/
|
||||
public abstract void setDefaultValue(Object defaultValue);
|
||||
/**
|
||||
* Gets the optional collection of acceptable values.
|
||||
* @return The optional collection of acceptable values.
|
||||
*/
|
||||
public abstract IList getValues();
|
||||
/**
|
||||
* Sets the optional collection of acceptable values.
|
||||
* @param values The optional collection of acceptable values.
|
||||
*/
|
||||
public abstract void setValues(IList values);
|
||||
}//IPropertyPartType//
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IReferencePart extends IAbstractPart {
|
||||
public static final String ATTRIBUTE_FUNCTION = "function";
|
||||
public static final String ATTRIBUTE_VALUE_HOLDER_NAME = "value-holder";
|
||||
public static final String ATTRIBUTE_HELD_TYPE_NAME = "value-type";
|
||||
public static final String ATTRIBUTE_ROW_TYPE_NAME = "row-type";
|
||||
public static final String ATTRIBUTE_NAME = "name";
|
||||
/**
|
||||
* Gets the name for the reference part.
|
||||
* @return The reference part name which is dependant on the reference type (for attributes it will be the attribute name, for methods the method name, for events the event name).
|
||||
*/
|
||||
public abstract String getName();
|
||||
/**
|
||||
* Sets the name for the reference part.
|
||||
* @param name The reference part name which is dependant on the reference type (for attributes it will be the attribute name, for methods the method name, for events the event name).
|
||||
*/
|
||||
public abstract void setName(String name);
|
||||
/**
|
||||
* Gets the name of the value holder associated with the part.
|
||||
* The value holder's held type defines the part if the value type name is null.
|
||||
* @return The the name of the value holder.
|
||||
*/
|
||||
public abstract String getValueHolderName();
|
||||
/**
|
||||
* Sets the name of the value holder associated with the part.
|
||||
* The value holder's held type defines the part if the value type name is null.
|
||||
* @param valueHolderName The the name of the value holder.
|
||||
*/
|
||||
public abstract void setValueHolderName(String valueHolderName);
|
||||
/**
|
||||
* Gets the qualified class name for the class of value held by the value holder for which this reference is valid.
|
||||
* @return The the qualified class name.
|
||||
*/
|
||||
public abstract String getHeldTypeName();
|
||||
/**
|
||||
* Sets the qualified class name for the class of value held by the value holder for which this reference is valid.
|
||||
* @param heldTypeName The the qualified class name.
|
||||
*/
|
||||
public abstract void setHeldTypeName(String heldTypeName);
|
||||
/**
|
||||
* Gets the qualified class name defining which row or data objects this reference is good for.
|
||||
* @return The the qualified class name.
|
||||
*/
|
||||
public abstract String getRowTypeName();
|
||||
/**
|
||||
* Sets the qualified class name defining which row or data objects this reference is good for.
|
||||
* @param rowTypeName The the qualified class name.
|
||||
*/
|
||||
public abstract void setRowTypeName(String rowTypeName);
|
||||
}//IReferencePartType//
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IReferencePartType extends IAbstractModel {
|
||||
public static final String ATTRIBUTE_FUNCTION = "function";
|
||||
public static final String ATTRIBUTE_REQUIRED = "required";
|
||||
public static final String ATTRIBUTE_REQUIRES_VALUE_HOLDER = "requires-value-holder";
|
||||
public static final String ATTRIBUTE_MULTIPLE = "multiple";
|
||||
/**
|
||||
* Gets the function name.
|
||||
* @return The function name.
|
||||
*/
|
||||
public abstract String getFunction();
|
||||
/**
|
||||
* Sets the function name.
|
||||
* @param function The function name.
|
||||
*/
|
||||
public abstract void setFunction(String function);
|
||||
/**
|
||||
* Determines whether the event must be present.
|
||||
* @return Whether the event must be specified.
|
||||
*/
|
||||
public abstract Boolean getRequired();
|
||||
/**
|
||||
* Determines whether the event must be present.
|
||||
* @param required Whether the event must be specified.
|
||||
*/
|
||||
public abstract void setRequired(Boolean required);
|
||||
/**
|
||||
* Gets whether the event must specify a value holder.
|
||||
* @return Whether a value holder is required to be specified.
|
||||
*/
|
||||
public abstract Boolean getRequiresValueHolder();
|
||||
/**
|
||||
* Sets whether the event must specify a value holder.
|
||||
* @param requiresValueHolder Whether a value holder is required to be specified.
|
||||
*/
|
||||
public abstract void setRequiresValueHolder(Boolean requiresValueHolder);
|
||||
/**
|
||||
* Determines whether multiple entries of the given component are allowed.
|
||||
* <p>Note: Just because mutliple are allowed to be defined doesn't mean multiple will be used. In some cases (methods and attributes) only the first applicable method or attribute is used.</p>
|
||||
* @return Whether multiple components of the given type may be specified.
|
||||
*/
|
||||
public abstract Boolean getMultiple();
|
||||
/**
|
||||
* Determines whether multiple entries of the given component are allowed.
|
||||
* <p>Note: Just because mutliple are allowed to be defined doesn't mean multiple will be used. In some cases (methods and attributes) only the first applicable method or attribute is used.</p>
|
||||
* @param required Whether multiple components of the given type may be specified.
|
||||
*/
|
||||
public abstract void setMultiple(Boolean multiple);
|
||||
}//IReferencePartType//
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.util.IManagedList;
|
||||
|
||||
public interface IReflectionMetadata {
|
||||
/**
|
||||
* Gets the type metadata instances that make up this reflection metadata.
|
||||
* @return The type metadata instances.
|
||||
*/
|
||||
public IManagedList getTypeMetadata();
|
||||
}//ReflectionMetadata//
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IStyleAlteration extends IAbstractModel {
|
||||
/**
|
||||
* Gets the name value.
|
||||
* @return The name value.
|
||||
*/
|
||||
public abstract String getName();
|
||||
/**
|
||||
* Sets the name value.
|
||||
* @param name The name value.
|
||||
*/
|
||||
public abstract void setName(String name);
|
||||
/**
|
||||
* Gets the value value.
|
||||
* @return The value value.
|
||||
*/
|
||||
public abstract Boolean getValue();
|
||||
/**
|
||||
* Sets the value value.
|
||||
* @param value The value value.
|
||||
*/
|
||||
public abstract void setValue(Boolean value);
|
||||
}//IStyleAlteration//
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.common.util.IList;
|
||||
|
||||
public interface IStyleSet extends IAbstractModel {
|
||||
public static final String NODE_NAME = "style-set";
|
||||
/**
|
||||
* Gets the style name.
|
||||
* @return The style name.
|
||||
*/
|
||||
public abstract String getName();
|
||||
/**
|
||||
* Sets the style name.
|
||||
* @param name The style name.
|
||||
*/
|
||||
public abstract void setName(String name);
|
||||
/**
|
||||
* Gets the collection of style alterations to be applied when this style is turned on.
|
||||
* @return The alterations list to be applied when setting this style.
|
||||
*/
|
||||
public abstract IList getAlterations();
|
||||
}//IStyleSet//
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.common.util.IList;
|
||||
|
||||
public interface IStyleType extends IAbstractModel {
|
||||
public static final String NODE_NAME = "style";
|
||||
/**
|
||||
* Gets the style name.
|
||||
* @return The style name.
|
||||
*/
|
||||
public abstract String getName();
|
||||
/**
|
||||
* Sets the style name.
|
||||
* @param name The style name.
|
||||
*/
|
||||
public abstract void setName(String name);
|
||||
/**
|
||||
* Gets whether the style is required.
|
||||
* @return Whether the style is required.
|
||||
*/
|
||||
public abstract Boolean getRequired();
|
||||
/**
|
||||
* Sets whether the style is required.
|
||||
* @param required Whether the style is required.
|
||||
*/
|
||||
public abstract void setRequired(Boolean required);
|
||||
/**
|
||||
* Gets the collection of style alterations to be applied when this style is turned on.
|
||||
* @return The alterations list to be applied when setting this style.
|
||||
*/
|
||||
public abstract IList getAlterations();
|
||||
}//IStyleType//
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public interface IViewMetadata {
|
||||
/**
|
||||
* Sets the package that the view normally is built in.
|
||||
* @return The view source package.
|
||||
*/
|
||||
public abstract String getPackage();
|
||||
/**
|
||||
* Sets the package that the view normally is built in.
|
||||
* @param packageName The view source package.
|
||||
*/
|
||||
public abstract void setPackage(String packageName);
|
||||
/**
|
||||
* Gets the platform that the view normally targets.
|
||||
* @return The view's target platform.
|
||||
*/
|
||||
public abstract IPlatform getPlatform();
|
||||
/**
|
||||
* Sets the platform that the view normally targets.
|
||||
* @param platform The view's target platform.
|
||||
*/
|
||||
public abstract void setPlatform(IPlatform platform);
|
||||
/**
|
||||
* Gets the reflection subsystem metadata for the view.
|
||||
* @return The view's reflect metadata.
|
||||
*/
|
||||
public abstract IReflectionMetadata getReflectionMetadata();
|
||||
/**
|
||||
* Sets the reflection subsystem metadata for the view.
|
||||
* @param reflectionMetadata The view's reflect metadata.
|
||||
*/
|
||||
public abstract void setReflectionMetadata(IReflectionMetadata reflectionMetadata);
|
||||
}//IViewMetadata//
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright (c) 2007,2008 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.common.util.IHashMap;
|
||||
import com.common.util.IList;
|
||||
import com.foundation.view.builder.IBuilder;
|
||||
|
||||
public interface IViewModel {
|
||||
public static final String TYPE_FILE_EXTENSION = ".cml"; //Control Modeling Language.//
|
||||
/**
|
||||
* Gets the mapping of ComponentType objects by the external type name defined in their component model file.
|
||||
* @return The componentTypeMap value.
|
||||
*/
|
||||
public abstract IHashMap getComponentTypeMap();
|
||||
/**
|
||||
* Gets the view's primary component.
|
||||
* @return The primaryViewComponent value.
|
||||
*/
|
||||
public abstract IComponentData getPrimaryViewComponent();
|
||||
/**
|
||||
* Gets the viewMetadata value.
|
||||
* @return The viewMetadata value.
|
||||
*/
|
||||
public abstract IViewMetadata getViewMetadata();
|
||||
/**
|
||||
* Gets the list (stack) of Message objects used to provide feedback to the developer.
|
||||
* @return The stack of errors and warnings which can be appended to as the build process progresses.
|
||||
*/
|
||||
public abstract IList getFeedbackStack();
|
||||
/**
|
||||
* Sets the list (stack) of Message objects used to provide feedback to the developer.
|
||||
* @param feedbackStack The stack of errors and warnings which can be appended to as the build process progresses.
|
||||
*/
|
||||
public abstract void setFeedbackStack(IList feedbackStack);
|
||||
/**
|
||||
* Gets the class loader used to load builder classes required by the loaded component types.
|
||||
* @return The class loader used to load the builder classes as needed by the view builder system.
|
||||
*/
|
||||
public abstract ClassLoader getBuilderClassLoader();
|
||||
/**
|
||||
* Gets the default package name which is used if no other is specified. If this is null then a package name must be specified by the model.
|
||||
* @return The package name to use if one is not specified by the model. This is useful if there is external metadata which indicates the package to be used.
|
||||
*/
|
||||
public abstract String getDefaultPackageName();
|
||||
/**
|
||||
* Sets the package name for the view, overriding the package name defined in the view.
|
||||
* @param packageName The package name to replace that given by the view.
|
||||
*/
|
||||
public abstract void setPackageOverride(String packageName);
|
||||
/**
|
||||
* Gets the attribute name formatted as an identifier defined by the class declaring the attribute.
|
||||
* @param name The attribute name or identifier to be formatted. If an identifier then nothing should be changed.
|
||||
* @return The attribute identifier name following either the identifier, or attribute formatting standards (and some illegal variations).
|
||||
*/
|
||||
public abstract String formatIdentifier(String name);
|
||||
/**
|
||||
* Gets the attribute identifier or name formatted as a Java attribute name.
|
||||
* @param name The name or identifier for an attribute.
|
||||
* @return The attribute name formatted either as a Java attribute, or as an identifier (or some illegal variations that can still be understood).
|
||||
*/
|
||||
public abstract String formatName(String name);
|
||||
/**
|
||||
* Gets a new builder for the associated component data.
|
||||
* @param componentData The component data whose source builder is required.
|
||||
* @return A new builder of the type specified by the component data's type given the target platform specified when creating this view builder.
|
||||
*/
|
||||
public IBuilder getBuilder(IComponentData componentData);
|
||||
/**
|
||||
* Gets the view defined name for the given component.
|
||||
* @param component The component whose name is to be retreived.
|
||||
* @return The name of the given component.
|
||||
*/
|
||||
public String getComponentName(IComponentData component);
|
||||
}//IViewModel//
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Copyright (c) 2005,2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
import com.foundation.util.xml.IElement;
|
||||
|
||||
/**
|
||||
* Encapsulates an error or warning message put out by the vml compiler.
|
||||
* The vml compiler will still throw a ViewBuilderException if unrecoverable error is detected.
|
||||
*/
|
||||
public class Message {
|
||||
private String message = null;
|
||||
private Throwable exception = null;
|
||||
private boolean isError = false;
|
||||
private int lineNumber = -1;
|
||||
private int startCharacter = -1;
|
||||
private int endCharacter = -1;
|
||||
/**
|
||||
* Message constructor.
|
||||
*/
|
||||
public Message(boolean isError, String message) {
|
||||
this(isError, message, null, -1, -1, -1);
|
||||
}//Message()//
|
||||
/**
|
||||
* Message constructor.
|
||||
*/
|
||||
public Message(boolean isError, Throwable exception) {
|
||||
this(isError, null, exception, -1, -1, -1);
|
||||
}//Message()//
|
||||
/**
|
||||
* Message constructor.
|
||||
*/
|
||||
public Message(boolean isError, String message, Throwable exception) {
|
||||
this(isError, message, exception, -1, -1, -1);
|
||||
}//Message()//
|
||||
/**
|
||||
* Message constructor.
|
||||
*/
|
||||
public Message(boolean isError, String message, IElement element) {
|
||||
this(isError, message, null, element);
|
||||
}//Message()//
|
||||
/**
|
||||
* Message constructor.
|
||||
*/
|
||||
public Message(boolean isError, Throwable exception, IElement element) {
|
||||
this(isError, null, exception, element);
|
||||
}//Message()//
|
||||
/**
|
||||
* Message constructor.
|
||||
*/
|
||||
public Message(boolean isError, String message, Throwable exception, IElement element) {
|
||||
this(isError, message, exception, element != null ? element.getStartLine() : -1, element != null ? element.getStartCharacter() : -1, element != null ? element.getEndCharacter() : -1);
|
||||
}//Message()//
|
||||
/**
|
||||
* Message constructor.
|
||||
*/
|
||||
public Message(boolean isError, String message, int lineNumber, int startCharacter, int endCharacter) {
|
||||
this(isError, message, null, lineNumber, startCharacter, endCharacter);
|
||||
}//Message()//
|
||||
/**
|
||||
* Message constructor.
|
||||
*/
|
||||
public Message(boolean isError, Throwable exception, int lineNumber, int startCharacter, int endCharacter) {
|
||||
this(isError, null, exception, lineNumber, startCharacter, endCharacter);
|
||||
}//Message()//
|
||||
/**
|
||||
* Message constructor.
|
||||
*/
|
||||
public Message(boolean isError, String message, Throwable exception, int lineNumber, int startCharacter, int endCharacter) {
|
||||
super();
|
||||
this.isError = isError;
|
||||
this.message = message;
|
||||
this.exception = exception;
|
||||
this.lineNumber = lineNumber;
|
||||
this.startCharacter = startCharacter;
|
||||
this.endCharacter = endCharacter;
|
||||
}//Message()//
|
||||
/**
|
||||
* Determines whether this message is an error versus a warning.
|
||||
* @return Whether this is an error which requires the developer's attention.
|
||||
*/
|
||||
public boolean isError() {
|
||||
return isError;
|
||||
}//isError()//
|
||||
/**
|
||||
* Gets the optional message to be given to the user.
|
||||
* <p>Note: A message or an exception must be provided at a minimum.</p>
|
||||
* @return The message displayed to the developer.
|
||||
*/
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}//getMessage()//
|
||||
/**
|
||||
* Gets the optional exception whose stack will be displayed to the user.
|
||||
* <p>Note: A message or an exception must be provided at a minimum.</p>
|
||||
* @return The exception displayed to the developer.
|
||||
*/
|
||||
public Throwable getException() {
|
||||
return exception;
|
||||
}//getException()//
|
||||
/**
|
||||
* Gets the optional line on which the message occured.
|
||||
* @return The one based line number, or -1 if there isn't a line number.
|
||||
*/
|
||||
public int getLineNumber() {
|
||||
return lineNumber;
|
||||
}//getLineNumber()//
|
||||
/**
|
||||
* Gets the optional starting character index within the context of the whole file.
|
||||
* @return The zero based index of the starting character in the file.
|
||||
*/
|
||||
public int getStartCharacter() {
|
||||
return startCharacter;
|
||||
}//getStartCharacter()//
|
||||
/**
|
||||
* Gets the optional ending character index within the context of the whole file.
|
||||
* @return The zero based index of the ending character in the file.
|
||||
*/
|
||||
public int getEndCharacter() {
|
||||
return endCharacter;
|
||||
}//getEndCharacter()//
|
||||
}//Message//
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2004,2007 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.foundation.view.definition;
|
||||
|
||||
public class TypeDefinitionException extends Exception {
|
||||
/**
|
||||
* TypeDefinitionException constructor.
|
||||
*/
|
||||
public TypeDefinitionException() {
|
||||
super();
|
||||
}//TypeDefinitionException()//
|
||||
/**
|
||||
* TypeDefinitionException constructor.
|
||||
* @param message
|
||||
*/
|
||||
public TypeDefinitionException(String message) {
|
||||
super(message);
|
||||
}//TypeDefinitionException()//
|
||||
/**
|
||||
* TypeDefinitionException constructor.
|
||||
* @param cause
|
||||
*/
|
||||
public TypeDefinitionException(Throwable cause) {
|
||||
super(cause);
|
||||
}//TypeDefinitionException()//
|
||||
/**
|
||||
* TypeDefinitionException constructor.
|
||||
* @param message
|
||||
* @param cause
|
||||
*/
|
||||
public TypeDefinitionException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}//TypeDefinitionException()//
|
||||
}//TypeDefinitionException//
|
||||
Reference in New Issue
Block a user