CentraSite Documentation : CentraSite Administrator’s Guide : Object Type Management : Creating a New Type : Define Profiles for an Asset Type : Defining a Computed Profile for CentraSite Control : Implementation Guidelines for Java-Based Computed Profiles
Implementation Guidelines for Java-Based Computed Profiles
Interfaces
Description
ComputedProfile
This interface declares basic rendering methods for the user interface.
void: init(java.lang.Object, Locale): with CentraSiteRegistryObject as a parameter where the necessary implementation is done and updateAsset() which would return a collection of registry object serves as a save hook.
boolean: canRenderUI(): This determines whether the rendering is based on the UI (true) or on the triples associated with the profile (false).
Collection: getAttributes(): returns a collection of ProfileAttribute and would be called only when canRenderUI() returns true.
Collection: updateAsset(): returns a collection of CentraSiteRegistryObject and would be called only when canRenderUI() returns true.
WebUIProfile
This interface is specific to the rendering for CentraSite Control.
java.lang.Object: createProfileContent(): create the profile contents with XML content (in compliance with Application Designer).
EclipseProfile
This interface is specific to the rendering for Eclipse Designer.
createFormContent(): create the profile contents on the supplied IManagedForm (in compliance with Eclipse Designer SWT/JFace library).
BUIProfile
This interface is specific to the rendering for CentraSite Business UI.
getEditPageURL(): returns URL of the edit page of computed profile and would be called only when canRenderUI() returns true.
getViewPageURL(): returns URL of the view page of computed profile and would be called only when canRenderUI() returns true.
getProfileDataAsJson(): returns a collection of profile data as JSON-formatted string.
Collection computeProfileData (String userInputsAsJSON): sets a collection of profile data as JSON-formatted string.
ProfileAttribute
This interface deals with the standard UI rendering of the profile's attributes and allows defining the attributes as key value pairs. The rendering of each attribute will be the standard rendering for the corresponding datatype of the attribute.
AttributeDescriptor: getAttributeDescriptor(): returns the descriptor of the attribute.
String: getAttributeKey(): returns the key of the attribute.
String: getName(): returns the name of the attribute.
Collection: getValue(): returns the value of the attribute.
ComputedAttributeLine
This interface deals with the user-defined UI rendering of the profile's attributes. The UI rendering of the attributes will be determined by the coding of this interface.
void: buildUI(StringBuilder layout): This method is responsible for rendering the layout definition.
void: passivate(): This method is responsible for storing the values back to the object.
void: revert(): This method is to revert the changes.
AttributeDescriptor
This interface deals with the standard properties (isReadOnly(), is Required()...) for an attribute.
String: getMinOccurs(): returns the minimum allowed occurrences of this attribute.
String: getMaxOccurs(): returns the maximum allowed occurrences of this attribute.
boolean: isRequired(): returns whether this attribute is required.
boolean: isReadOnly(): returns whether this attribute is read-only.
boolean: hasDefaultValue(): returns whether this attribute has a default value.
Object: getDefaultValue(): returns the default value of this attribute.
int: getMaxLength(): returns the maximum length of this attribute.
String: getDataType(): returns the data type of this attribute.
Object: getNativeAtribute(): returns the native attribute instance if the data type is not primitive, otherwise returns null.
String[]: getEnumValues():
boolean: isPrefix(): returns whether this slot's unit label is a prefix or suffix value. Return true if the unit label is a prefix, false for suffix.
int getPrecision(): returns the precision for a number attribute.
String: getUnitLabel(): returns this slot's unit label. The label may be null.
Copyright © 2005-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback