Class GProp<VALUE>
- All Implemented Interfaces:
EventListener
,IGProp<VALUE>
,Cloneable
- Direct Known Subclasses:
AbstractReference
,AnnotationsContainer
,BadgeProp
,BoolProp
,ByteArrayProp
,CharProp
,CodeItemArrayProp
,ColorProp
,DateTimeProp
,DeviceProp
,DoubleProp
,ErrorsProp
,FillProp
,FontProp
,GradientProp
,HostSessionProps
,Int32Prop
,IntProp
,KStringProp
,LongProp
,MultiProp
,PrivProp
,PropCnr
,RectProp
,RemoteHostSessionProp
,SizeProp
,StringArrayProp
,StringMapProp
,StringProp
,StringSetProp
,StrokeProp
,StylesReferences
,TableCell
,ThemesProp
,TooltipProp
,TypesContainer
,UnitProp
,ValueProp
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionprotected static final boolean
Debug mode.static final String
Property attribute: Editor property.static final String
Property attribute: errored property name, event value = String or null.static final String
Property attribute: extends.static final String
Property attribute: extends private.static final String
Property attribute: extends private.static final String
Property attribute: nullable.static final String
Property attribute: private.static final String
Property attribute: private change event.static final String
Property attribute: read-only.protected static final int
Flag indicating property is a USER_1 and not written to XML.protected static final int
Flag indicating property is a USER_2 and not written to XML.Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_INCLUDE_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
addPropError
(IPropErrorItem item) Adds an error input to the property.final void
Adds a listener for the property.protected final void
appendProp
(PropMgr propertyManager, SendTransaction trans) Appends the property name and value and all its children to a transaction using thePropMgr
.protected abstract void
appendPropValue
(PropMgr propertyManager, SendTransaction trans, Object value) Appends the property value and all its children to a transaction using theAtomManager
.clone()
Creates a clone out of this property.protected final Object
convertPropError
(String string, Exception thrown) Creates and throws a PropertyException when theString
doesn't convert properly into a "native" Object.final void
dispose()
Disposes of the property, but doesn't remove it from a parent.final boolean
Checks for equality, including private properties.final boolean
Checks for equality.protected boolean
equalsErrors
(PropError pe1, PropError pe2, int how) Processes error property verification.final Object
Checks for equality.final boolean
equalsPropValue
(Object otherPropValue) Checks if another value is equal to the value in this object.protected Object
equalsTree
(PropCnr pc, int how) Checks for equality in the whole container structure.protected Object
equalValues
(GProp<?> compareTo, VALUE thisValue, VALUE compareValue, int how) Checks for property value equality.protected void
finalize()
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.void
Logs a fine event.void
Logs a fine event.void
Logs a finer event.void
Logs a finer event.void
Logs a finest event.void
Logs a finest event.fromElementString
(String string) Called from theinitializeProperty(Element element)
method once the element String is retrieved from the "value" attribute of the element.getAliasName
(GProp<?> requestor, String projectName) Gets an alias name for a project name, the alias does NOT begin with "*".Returns the Application Session Gyro instance of this virtualized property.Gets the application session worker.final Atom[]
getAtomPath
(PropCnr stopAt) Gets the atom path of this property.static String
getAttribute
(Element element, String name) Gets a attribute string.getChildReferencePropName
(GProp<?> child) Gets the child's reference property name for this property.Returns the Client Session Gyro instance of this virtualized property.Gets the client session worker.Gets the constraints string for this property.Gets the environment properties.final void
getErroredPropItems
(ArrayList<PropErrorItemOrigin> list, boolean excludeExtends) Retrieves the list of error items for this property and its children (if this property is a container).final void
getErroredProps
(ArrayList<GProp<?>> list, boolean excludeExtends) Retrieves the properties containing errors.Gets the error property from the parent.Searches for an Extends container for a property.Gets the full name of this property, i.e.getFullPropName
(GProp<?> requestor) Gets the full name of this property, i.e.Gets the full name of this property, i.e.getFullPropNameDebug
(GProp<?> requestor) Gets the full name of this property, i.e.Gets the listeners.getModuleFolder
(IPluginDescriptor<?> descriptor) Gets the property container of specified type from the properties root.getModuleFolder
(String folderName) Gets the property container of specified type from the properties root.final PropCnr
Gets the parent of this property.final <PROPCNR extends PropCnr>
PROPCNRGets the parent of this property with the requested type.getProjectName
(GProp<?> requestor, String alias) Gets the project name from an alias, the alias does NOT begin with "*".final Atom
Gets the atom used for the name of this property.Gets a base property container reference instance from the container or any parent containers.final PropError
Gets the property error instance.getPropError
(String id) Gets the error input item with specified ID, for none specify empty string.Gets the errored (atom) name input by the user.final int
Gets the error severity of this property.int
Checks if this property extends another property, and if so gets the extends flags.final GProp
<?> getPropFromPath
(GProp<?> requestor, String path) Finds a property in the tree of the requested name from a path specification, i.e.GProp
<?> getPropFromPath
(String path) Finds a property in the tree of the requested name from a path specification, i.e.GProp
<?> getPropFromReference
(GProp<?> requestor, String path) Internal function for getPropFromReference(ref).GProp
<?> Gets a property from a reference name.final int
Gets the index of this property in the parent container.final String
Gets the name of this property.final PropCnr[]
getPropPath
(boolean includeThisPropCnr) Gets the parents to the root of this property.final PropCnr[]
getPropPath
(boolean includeThisPropCnr, IPropCnr stop) Gets the parents to the input property or the root of this property.protected GProp
<?> Retargets the reference request as required.Gets the Property Manager used for communication for the root container.final int
getPropTreeErrorSeverity
(boolean excludeExtends) Gets the maximum error severity of this property or any property below.final VALUE
Gets the current value set, null for an uninitialized value.final Object
getPropValue
(Class<?> requestedType) Gets the property value in another class form than the "native" one.protected abstract Object
getPropValue0
(Object value, int index) Gets the property value in another class form than the "native" one.final Object
Gets the current value set, null for an uninitialized value.final String
Gets the reference property name, overridden when used in the Designer to skip the file storage property, and by the root property.final String
Gets the reference property name, overridden when used in the Designer to skip the file storage property, and by the root property.final String
getRelativePropName
(IPropCnr container) Gets the relative name of this property to a container.getRootFromName
(GProp<?> requestor, String module) Gets the module root for a name.getRootName
(GProp<?> requestor) Gets and checks if this container is the root.final PropCnr
Gets the root container in the property tree.final PropCnr
Gets the root container in the property tree.final Object
Gets the tree-lock object used when locking the property tree when structural changes are made or when creating/reading transactions that could potentially cause a structural change.abstract Class<?>[]
Gets the list of possible native Java classes that can be used to set a value usingsetPropertyValue
, in order of importance.getVSReference
(Atom refAtom) Gets a VSReference instance from the container or any parent containers.final boolean
Checks if the value has been changed since last time the other party was updated by a call toappend
or since last call to{link #resetChangedTree()}
.final boolean
Checks if there is any presence of a circular reference error registered for the property made by e.g.final boolean
Checks the flag indicating this property uses a "private" change event, i.e.final boolean
Checks if this property has an error.final boolean
hasPropTreeError
(boolean excludeExtends) Checks if any property in the tree below this property has an error.void
Logs an informational event.void
Logs an informational event.protected void
initializeElement
(Element element) Called when the XML file for the property tree is serialized from properties.final void
initializeGElement
(Element element) Called when the XML file for the property tree is serialized from properties.final void
initializeGProp
(Element element) Called to initialize the generic property from anElement
.protected void
initializeProp
(Element element) Called to initialize the property from anElement
.protected abstract boolean
initializeValue
(PropMgr propertyManager, ReadTransaction trans) Initializes the property value from a transaction.final boolean
Checks if the property is disposed.final boolean
isPropChildOf
(IPropCnr parent) Checks if this property is child of a parent property.final boolean
Checks if this property is created on the client or not.boolean
Checks if this property container is used with the communication framework.final boolean
Checks if this property requires a "create transaction" when sent to the other party (server to client or vice versa).final boolean
Checks the flag indicating this property is a property belonging to another container.final boolean
Checks if this property is Extends Final in regards to the Extends Framework.final boolean
Checks if this property is Extends Private in regards to the Extends Framework.final boolean
Checks if the property is Extends Private from this property and up to, but not including the "isExtendsRoot()" property container in the parent chain of properties.final boolean
Checks if the property is Extends Private from this property and up to, but not including the "isExtendsRoot()" property container in the parent chain of properties.boolean
Checks if this is a File property container.boolean
Checks if this is a Folder property container.final boolean
Checks if this property is for the Editor only and should e.g.final boolean
Checks if this property is nullable.final boolean
Checks if this property is private, i.e.protected boolean
Called upon creation of the property to check it's private state.final boolean
Checks if this property is read-only.boolean
Verifies if the tree is valid for reference creation.boolean
Checks if this is a root property container.boolean
Checks if the root property container is currently loading properties from Jar or files to avoid reference checking until the end.protected boolean
Checking if a root property is allowed to be modified even after loading has completed.protected final boolean
isPropUSER
(long userValue) Checks if this property is "PROP_USER_*.protected boolean
Checks if the tree needs to be locked when setting the property value.final boolean
Checks if this property has been virtualized.protected boolean
Checks if currently virtualizing during a clone operation.final boolean
Checks if this property is volatile, i.e.protected boolean
Checks if this property is volatile, i.e.final boolean
Checks if a property is a child of a proxied property container.final boolean
Checks if the property parameter is a sibling property in this container property.void
list()
Prints a listing of this property to the standard system output streamSystem.out
.void
list
(PrintStream out) Prints a listing of this property to the specified output stream.void
list
(PrintStream out, int indent) Prints out a list, starting at the specified indentation, to the specified print stream.void
list
(PrintWriter out) Prints a listing to the specified print writer.void
list
(PrintWriter out, int indent) Prints out a list, starting at the specified indentation, to the specified print writer.mapAliasToReference
(GProp<?> requestor, String aliasReference) Maps an alias reference name to a reference name.final String
mapAliasToReference
(String aliasReference) Maps an alias reference name to a reference name.mapReferenceToAlias
(GProp<?> requestor, String referenceName) Maps a reference name to an alias name.final String
mapReferenceToAlias
(String referenceName) Maps a reference name to an alias name.final String
mapReferenceToProjectRelative
(String referenceName) Maps a reference name to project relative format, i.e.protected int
modifyPropValue
(Object oldValue, Object newValue, PropMgr propMgr) Called when setting a new value for this property.final boolean
Moves this property container to another container, without changing the listeners.final boolean
Moves this property container to another container, without changing the listeners.final boolean
Moves this property container to another container, without changing the listeners.final void
Called when a property event is send to this property.void
onEventSelf
(GEvent event) Called when a property event is send to this property.protected void
onPrepare
(IAppOwner appOwner, IModuleOwner moduleOwner, boolean isPostCall, List<Throwable> errors) Called when the application is being prepared.protected void
Called when a property is disposed of by delete/remove in a container, or by the dispose method.protected void
Invalidates a potential cache in this property.protected void
onPropParentChanged
(PropCnr oldParent, PropCnr newParent) Called when the parent is changed for this class.void
Called when the property has initialized from the Element when streamed from an XML file, has had all (if any) children elements and nodes added as properties and that the property has been added into it's parent.protected void
onPropValueSet
(Object oldValue) Called when the property value is changed by theGProp
class.protected void
Called to perform reference resolving.void
onRemoteEvent
(RemoteEvent event) Called when a remote property event should be processed by this property.protected void
onVirtualizationCompleted
(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, boolean isPostResolve) Called when virtualization completed.protected String
Returns the parameter string representing the state of this event.protected String
paramString
(boolean includeFullProperties) Returns the parameter string representing the state of this event.protected String
paramValue
(Object value) Formats the value as a string to add toparamString
.void
Post a runnable for invocation at a later stage by the worker thread (or SWT thread for the Designer if the worker parameter is null).void
Post a runnable for invocation at a later stage by the worker thread (or SWT thread for the Designer).final boolean
Removes an error input from the property.final void
Removes a listener for the property.protected final void
removePropUSER
(long userValue) Removes the flag indicating property is "PROP_USER_*.final boolean
renameProp
(Atom propertyAtom) Renames this property.final boolean
renameProp2
(Atom propertyAtom) Renames this property.protected final void
Forces clearing of the change flag for this property and all its children.void
resolveRuntimeReferences
(IRuntimeResolver resolver) Called before transactions are prepared for sending.final void
Forces setting of the change flag.void
setConstraints
(Object constraints, String prevConstraints, Element prevElement) Sets the constraints for the property previously returned from the same constraints call tosetConstraints(String,Element)
with the same String and Element as this instance would require.setConstraints
(String constraints, Element element) Sets the constraints for the property.protected boolean
Sets the flag indicating property requires a "create transaction" when sent to the other party (server to client or vice versa).final void
Sets the parent for this property.final boolean
setPrivateChangeEventProp
(boolean on) Sets the flag indicating this property uses a "private" change event, i.e.protected final void
Sets the flag indicating property requires a "create transaction" when sent to the other party (server to client or vice versa).boolean
setPropError
(PropError error) Sets all or clears the errors for the property.boolean
setPropErroredName
(String name) Sets the errored name for this property.final void
setPropExtended
(boolean on) Sets the flag indicating this property is extended.final boolean
setPropExtendsFinal
(boolean on) Sets the flag indicating property is a Extends Final property in the container when this property belongs to the Extends Framework.final boolean
setPropExtendsPrivate
(boolean on) Sets the flag indicating property is a Extends Private property in the container when this property belongs to the Extends Framework.final void
setPropForEditor
(boolean on) Sets the flag indicating property is the Editor only.final boolean
setPropNullable
(boolean on) Sets the flag indicating property is nullable with setPropValue.final boolean
setPropPrivate
(boolean on) Sets the flag indicating property is private.final boolean
setPropReadOnly
(boolean on) Sets the flag indicating property is read-only.protected final void
setPropUSER
(long userValue) Sets the flag indicating property is "PROP_USER_*.final boolean
setPropValue
(Object newValue) Sets a new value for this property.final boolean
setPropValue
(Object newValue, IGProp<?> trigger) Sets a new value for this property.protected final boolean
setPropValue
(Object newValue, PropMgr propMgr) Sets a new value for this property.protected final void
setPropValueIncognito
(Object newValue) Sets a new value for this property.final void
Sets the flag indicating property is "volatile" and is not written to XML.void
Logs a severe event.void
Logs a severe event.void
Logs a severe event.protected boolean
shouldSerializeToXML
(int programType) Method used to check for serialization to XML.protected final void
Throw an error if the property is read-only.toElementString
(Object value) Called from theinitializeElement(Element element)
method.final Object
toNativeValue
(Object value) Tries conversion of possibly accepted properties values using thesetPropertyValue
method into the most preferred property value type.protected abstract Object
toNativeValue0
(Object value, int index) Tries conversion of possibly accepted properties values using thesetPropertyValue
method into the most preferred property value type.toString()
Returns a string representation of this component and its values.static String
The toString representation without risk of causing a StackOverflow in case of round-robbin scenarios.void
triggerRemoteEvent
(int localID) Triggers a remote event for execution at the remote partyonRemoteEvent()
method of this remote property instance.void
triggerRemoteEvent
(int localID, PropCnr params) Triggers a remote event for execution at the remote partyonRemoteEvent()
method of this remote property instance.final void
validateProp
(Object newValue) Validates the value to set by first callingvalidateType
, thenvalidateValue
and finally calling an optional validator (if set).abstract void
validatePropType
(Object newValue) Validates the newValue against the property object type.void
validatePropValue
(Object newValue) Validates the value to set.boolean
verify
(PropVerification verification) Verifies this property.virtualize
(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace) Call this method to "virtualize" a property tree.void
Logs a warning event.void
Logs a warning event.void
Logs a warning event.
Field Details
GPDEBUG
protected static final boolean GPDEBUGDebug mode.- See Also:
PROP_USER_1
protected static final int PROP_USER_1Flag indicating property is a USER_1 and not written to XML.- See Also:
PROP_USER_2
protected static final int PROP_USER_2Flag indicating property is a USER_2 and not written to XML.- See Also:
PROP_ATTR_STRING_READ_ONLY
Property attribute: read-only.- See Also:
PROP_ATTR_STRING_PRIVATE
Property attribute: private.- See Also:
PROP_ATTR_STRING_NULLABLE
Property attribute: nullable.- See Also:
PROP_ATTR_STRING_EDITOR_PROP
Property attribute: Editor property.- See Also:
PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT
Property attribute: private change event.- See Also:
PROP_ATTR_STRING_EXTENDS
Property attribute: extends.- See Also:
PROP_ATTR_STRING_EXTENDS_PRIVATE
Property attribute: extends private.- See Also:
PROP_ATTR_STRING_EXTENDS_FINAL
Property attribute: extends private.- See Also:
PROP_ATTR_STRING_ERRORED_NAME
Property attribute: errored property name, event value = String or null.- See Also:
Constructor Details
GProp
protected GProp()Creates a generic property. This constructor should only be used by thePropertyManager
, but as the call is dynamically processed, an empty constructor is easiest to handle.Once the property is created, the
initialize(String name)
method should be called.GProp
Creates a generic property with the specified name with a null value. Theinitialize
method must then be called.- Parameters:
propertyAtom
- the property atom.
Method Details
dispose
public final void dispose()Disposes of the property, but doesn't remove it from a parent. Calling the method more than once will result in a no-operation.All children of this property, if any, will also be disposed of.
This method calls the
onPropDispose()
method.isDisposed
public final boolean isDisposed()Checks if the property is disposed.- Specified by:
isDisposed
in interfaceIGProp<VALUE>
- Returns:
- true if property is disposed of, false otherwise.
finalize
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.When called, the property is disposed of.
post
Post a runnable for invocation at a later stage by the worker thread (or SWT thread for the Designer).- Parameters:
runnable
- The runnable.
post
Post a runnable for invocation at a later stage by the worker thread (or SWT thread for the Designer if the worker parameter is null).In the server, this call MUST be done from a virtualized property if the
worker
isnull
. The worker used is the application session worker.- Parameters:
worker
- The worker to use, null for default.runnable
- The runnable.
getAppWorker
Gets the application session worker.Do not abuse of this method (save the reference to the worker) as it requires a little look-up work to get the application session gyro.
- Returns:
- The application session worker, or null if the AppSessionGyro is not found (e.g. called from Designer or not a virtualized property).
- Throws:
IllegalStateException
- If called in the server and the AppSessionGyro cannot be retrieved AND the property is virtualized.
getClientWorker
Gets the client session worker.Do not abuse of this method (save the reference to the worker) as it requires a little look-up work to get the client session gyro.
- Returns:
- The client session worker, or null if the ClientSessionGyro is not found (e.g. called from Designer or not a virtualized property).
- Throws:
IllegalStateException
- If called in the server and the ClientSessionGyro cannot be retrieved AND the property is virtualized.
getListeners
Gets the listeners.- Returns:
- A new array of event listeners, never null.
getTreeLock
Gets the tree-lock object used when locking the property tree when structural changes are made or when creating/reading transactions that could potentially cause a structural change. Code synchronized on a single property should not synchronize on the tree, it must synchronize on the tree first, then the property itself.- Specified by:
getTreeLock
in interfaceIGProp<VALUE>
- Returns:
- The tree lock object, perhaps asking the parent for it until the root is found. This call is quite expensive in terms of CPU and should be avoided if possible.
isPropClientCreated
public final boolean isPropClientCreated()Checks if this property is created on the client or not.- Specified by:
isPropClientCreated
in interfaceIGProp<VALUE>
- Returns:
- true for the client, false for server or editor.
onPropInvalidateCache
protected void onPropInvalidateCache()Invalidates a potential cache in this property. This method is called during a synchronized state of the property. Subclasses override this method to provide a robust caching mechanism.resolveRuntimeReferences
Called before transactions are prepared for sending. This method allows creation of e.g. runtime references such as Styles or Panel references that adds a virtual instance for the Client.This call is propagated in the entire client tree.
- Specified by:
resolveRuntimeReferences
in interfaceIGProp<VALUE>
- Parameters:
resolver
- The reference resolver.
getValueClasses
Gets the list of possible native Java classes that can be used to set a value usingsetPropertyValue
, in order of importance. Note that loss of precision in data if e.g. an Float property accepts a Double. However, thesetPropertyValue
throwsIllegalArgumentException
if the range in invalid, e.g. conversion of a Integer to a Byte, and the value is not -127 to 128.- Specified by:
getValueClasses
in interfaceIGProp<VALUE>
- Returns:
- The array of Java classes that can be accepted in the
setPropertyValue
method. The first type is the "native" or most preferred type. The array is at least one item in length and never null.
clone
Creates a clone out of this property. The cloning is overridden by the super classes in order to handle cloning of its class variables appropriately.Cloning is used for "virtualization" of a property tree in the server. Client property classes will therefore throw
CloneNotSupportedException
.Once a tree has been cloned, the change-flag is reset, and the create-flag is set. All listeners are also removed! The new cloned property is an orphan, i.e. has no parent set.
Note that the cloning process is done WITHOUT thread synchronization for performance reasons, thus no modifications should be done to the tree!
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
- If a subclass doesn't allow cloning, e.g. the client properties.
onPrepare
protected void onPrepare(IAppOwner appOwner, IModuleOwner moduleOwner, boolean isPostCall, List<Throwable> errors) throws PropException Called when the application is being prepared. The order ofonPrepare
calls is always parent first, the children. The method is called twice, first time withisPostCall
set tofalse
, then a second time withtrue
.- Parameters:
appOwner
- The application owner.moduleOwner
- The Module owner.isPostCall
- Flag indicating this is a post-call.errors
- A list of errors that occurred but did not cause an abort.- Throws:
PropException
- For property errors during the application preparation to need to abort.
isPropVirtualizing
protected boolean isPropVirtualizing()Checks if currently virtualizing during a clone operation.- Returns:
- true during the virtualization process, false otherwise (also when virtualization has completed).
virtualize
protected GProp<VALUE> virtualize(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace) throws CloneNotSupportedException, PropException Call this method to "virtualize" a property tree. This method is used at runtime in the Server for the application session of virtual instances of VirtualSpace, but also virtual instances of panels, for the individual client session. The VirtualSpace is virtualized once for the application session and is shared for parallel client sessions.This method is similar to cloning, but enables references that are already resolved to remain if they point to a shared instance, e.g. the VirtualSpace pointing to its participants in the application property container shared instance, or a panel with references to text IDs, assets, etc.
It is up to the property class to handle this by overriding this method.
- Parameters:
appGyro
- The application gyro instance performing the virtualization.clientGyro
- The client gyro session, can benull
if not initialized from the client gyro.virtualSpace
- The virtualized VirtualSpace.- Returns:
- The virtualized property.
- Throws:
CloneNotSupportedException
- If a subclass doesn't allow cloning, e.g. the client properties.PropException
- For property errors during the virtualization.IllegalStateException
- IllegalStateException if the property is in an invalid state, e.g. in virtualizing state.
onVirtualizationCompleted
protected void onVirtualizationCompleted(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, boolean isPostResolve) Called when virtualization completed.Overriding classes must call
super.onVirtualizationCompleted(IAppSessionGyro appGyro,IClientSessionGyro clientGyro,VirtualSpace virtualSpace,boolean isPostResolve)
if they override this method.This method is called to the entire tree of the newly virtualized property container.
- Parameters:
appGyro
- The application gyro instance performing the virtualization.clientGyro
- The client gyro session, can benull
if not initialized from the client gyro.virtualSpace
- The virtualized VirtualSpace.isPostResolve
- Flag indicating this call is done after references are attempted to be resolved.
getAppSessionGyro
Returns the Application Session Gyro instance of this virtualized property.To get the
instance from the current thread useIAppSessionGyro
, orIAppSessionGyro.getSessionInstance()
to get it from the session information instance.IAppSessionGyro.getSessionInstance(SessionInfo)
Do not abuse of this method as it requires a little look-up work.
- Specified by:
getAppSessionGyro
in interfaceIGProp<VALUE>
- Returns:
- The Application Session Gyro if this instance is virtualized, null otherwise.
getClientSessionGyro
Returns the Client Session Gyro instance of this virtualized property. This method only work for properties in a panel tree. Data connectors may sometimes also provide
support.IClientSessionGyro
To get the
instance from the current thread useIClientSessionGyro
, orIClientSessionGyro.getSessionInstance()
to get it from the session information instance.IClientSessionGyro.getSessionInstance(SessionInfo)
Do not abuse of this method as it requires a little look-up work.
- Specified by:
getClientSessionGyro
in interfaceIGProp<VALUE>
- Returns:
- The Client Session Gyro if this instance is virtualized and is in a
UIPanelBase
(panels) tree (or for certain data connectors), null otherwise.
renameProp
Renames this property. This is allowed if the property has no parent or the parent accepts the rename.- Specified by:
renameProp
in interfaceIGProp<VALUE>
- Parameters:
propertyAtom
- The new atom name.- Returns:
- true if name has changed, false otherwise.
- Throws:
PropException
- If rename causes duplicate names in parent.NullPointerException
- If propertyAtom is null.
renameProp2
Renames this property. This is allowed if the property has no parent or the parent accepts the rename.- Parameters:
propertyAtom
- The new atom name.- Returns:
- true if name has changed, false otherwise.
- Throws:
InternalError
- If rename causes duplicate names in parent.NullPointerException
- If propertyAtom is null.
getPropAtom
Gets the atom used for the name of this property.- Specified by:
getPropAtom
in interfaceIGProp<VALUE>
- Returns:
- Atom, the property atom.
getPropName
Gets the name of this property.- Specified by:
getPropName
in interfaceIGProp<VALUE>
- Returns:
- String Name of the property, or null if no property atom is present.
getPropErroredName
Gets the errored (atom) name input by the user.- Returns:
- The errors (atom) name for the property, or null for no error.
setPropErroredName
Sets the errored name for this property. This causes a property name event.- Parameters:
name
- The name, or null for no error.- Returns:
- true for change, false indicating no change performed and no event fired.
- Throws:
PropTypeException
- If the property is read-only.
getModuleFolder
Gets the property container of specified type from the properties root.- Specified by:
getModuleFolder
in interfaceIGProp<VALUE>
- Parameters:
folderName
- The folder name.- Returns:
- The folder in the project,
null
if not found.
getModuleFolder
Gets the property container of specified type from the properties root.- Specified by:
getModuleFolder
in interfaceIGProp<VALUE>
- Parameters:
descriptor
- The folder descriptor.- Returns:
- The folder in the project,
null
if not found.
getRootName
Gets and checks if this container is the root. The name returned is in the Editor"module:"
and in""
(empty string) when running in the Server.When running with assertions, this call throws an assertion error by default, showing that the call is directed to a non-root property container.
- Parameters:
requestor
- The requestor of the information.- Returns:
- Name string if this is the root as "project:" for the Designer, and "" for the Server, null otherwise.
getProjectName
Gets the project name from an alias, the alias does NOT begin with "*".- Parameters:
requestor
- The requestor of the information.alias
- The alias.- Returns:
- The project name for the alias, or null if not found.
getAliasName
Gets an alias name for a project name, the alias does NOT begin with "*".- Parameters:
requestor
- The requestor of the information.projectName
- The project name (without ending ':').- Returns:
- The alias name without leading '*' for the project name, or null if not found.
getRootFromName
Gets the module root for a name. In the Editor, the module is the project, and that root container is returned. In the Server, the module doesn't matter, so the real root returns itself.When running with assertions, this call throws an assertion error by default, showing that the call is directed to a non-root property container.
- Parameters:
requestor
- The requestor of the information.module
- The module name (without colon), i.e. the project name in the Designer.- Returns:
- The root property container, or null if this container is not the root, or if the module name is not found. The default implementation returns null.
getFullPropName
Gets the full name of this property, i.e. concatenated with the parent names separated with slashes ("/"), and in the Designer including the project name. The difference with this method andgetReferencePropName()
is that instances ofFilePropCnr
are omitted in the path ingetReferencePropName()
, but not in this method.- Specified by:
getFullPropName
in interfaceIGProp<VALUE>
- Returns:
- A full property path string as "/path/propName" in the Server, "project:/path/propName" in the Designer.
getFullPropName
Gets the full name of this property, i.e. concatenated with the parent names separated with slashes ("/"), and in the Designer including the project name. The difference with this method andgetReferencePropName()
is that instances ofFilePropCnr
are omitted in the path ingetReferencePropName()
, but not in this method.- Parameters:
requestor
- The requestor.- Returns:
- A full property path string as "/path/propName" in the Server, "project:/path/propName" in the Designer.
getFullPropNameDebug
Gets the full name of this property, i.e. concatenated with the parent names separated with slashes ("/"), and in the Designer including the project name. The difference with this method andgetReferencePropName()
is that instances ofFilePropCnr
are omitted in the path ingetReferencePropName()
, but not in this method.This method is equal to the
getFullPropName()
method, without checks for root parent. This method is typically used for debugging and trace output.- Specified by:
getFullPropNameDebug
in interfaceIGProp<VALUE>
- Returns:
- A full property path string as "/path/propName" in the Server, "project:/path/propName" in the Designer.
getFullPropNameDebug
Gets the full name of this property, i.e. concatenated with the parent names separated with slashes ("/"), and in the Designer including the project name. The difference with this method andgetReferencePropName()
is that instances ofFilePropCnr
are omitted in the path ingetReferencePropName()
, but not in this method.This method is equal to the
getFullPropName()
method, without checks for root parent. This method is typically used for debugging and trace output.- Parameters:
requestor
- The requestor.- Returns:
- A full property path string as "/path/propName" in the Server, "project:/path/propName" in the Designer.
getRelativePropName
Gets the relative name of this property to a container.- Specified by:
getRelativePropName
in interfaceIGProp<VALUE>
- Parameters:
container
- The container to use as base name, null if root is required.- Returns:
- The relative property name with a path to the container as
"path/propName"
, empty string if no parent orcontainer
parameter is this property.null
is returned if the container is not a parent of this property, i.e. if the root is found before the container.
isSibling
Checks if the property parameter is a sibling property in this container property.isPropRoot
public boolean isPropRoot()Checks if this is a root property container. It is overridden by the root property.- Specified by:
isPropRoot
in interfaceIGProp<VALUE>
- Returns:
- true for the root, false otherwise.
isPropRootLoading
public boolean isPropRootLoading()Checks if the root property container is currently loading properties from Jar or files to avoid reference checking until the end.Note: A look-up for the root property is not done, so this call must be made to the root property itself!
- Returns:
- The loading flag, always
false
unless overridden by the real root property that handles loading.
isPropRootTreeModificationsAllowed
protected boolean isPropRootTreeModificationsAllowed()Checking if a root property is allowed to be modified even after loading has completed.Override this method to return another value than
false
.- Returns:
- Flag indicating that the tree of properties below this container can be modified.
getPropRootPropMgr
Gets the Property Manager used for communication for the root container. If this is not the root container, the parent function is called upwards in tree.- Specified by:
getPropRootPropMgr
in interfaceIGProp<VALUE>
- Returns:
- The Property Manager, or null when not attached to a root.
isPropReferenceTreeValid
public boolean isPropReferenceTreeValid()Verifies if the tree is valid for reference creation. This method is typically overridden in a root property that has a Property Manager owner that in turn is checked for a particular configuration (e.g. Client-related references such as LabelForReference that does not create references when communicating).- Specified by:
isPropReferenceTreeValid
in interfaceIGProp<VALUE>
- Returns:
- true if the root property manager is found, false otherwise.
isPropFolder
public boolean isPropFolder()Checks if this is a Folder property container. It is overridden byFolderPropCnr
.- Specified by:
isPropFolder
in interfaceIGProp<VALUE>
- Returns:
- true for
FolderPropCnr
, false otherwise.
isPropFile
public boolean isPropFile()Checks if this is a File property container. It is overridden byFilePropCnr
.- Specified by:
isPropFile
in interfaceIGProp<VALUE>
- Returns:
- true for
FilePropCnr
, false otherwise.
mapAliasToReference
Maps an alias reference name to a reference name.Alias reference names have the format "*alias:/path/propName".
This method is overridden by the root container in a project.
- Specified by:
mapAliasToReference
in interfaceIGProp<VALUE>
- Parameters:
aliasReference
- The alias reference name.- Returns:
- The default implementation is to return the same as the input
aliasReference
. If the aliasReference is not found, the same String as the inputaliasReference
is returned.
mapAliasToReference
Maps an alias reference name to a reference name.Alias reference names have the format "*alias:/path/propName".
This method is overridden by the root container in a project.
- Parameters:
requestor
- The requestor.aliasReference
- The alias reference name.- Returns:
- The default implementation is to return the same as the input
aliasReference
. If the aliasReference is not found, the same String as the inputaliasReference
is returned.
mapReferenceToAlias
Maps a reference name to an alias name.Alias names have the format "*alias:/path/propName".
This method is overridden by the root container in a project.
- Specified by:
mapReferenceToAlias
in interfaceIGProp<VALUE>
- Parameters:
referenceName
- The reference name.- Returns:
- The default implementation is to return the same as the input
referenceName
. If there is not alias for the project, the same String as the inputreferenceName
is returned.
mapReferenceToAlias
Maps a reference name to an alias name.Alias names have the format "*alias:/path/propName".
This method is overridden by the root container in a project.
- Parameters:
requestor
- The requestor.referenceName
- The reference name.- Returns:
- The default implementation is to return the same as the input
referenceName
. If there is not alias for the project, the same String as the inputreferenceName
is returned.
mapReferenceToProjectRelative
Maps a reference name to project relative format, i.e. with a project name of "." instead of the project name (if it's the current project name).- Specified by:
mapReferenceToProjectRelative
in interfaceIGProp<VALUE>
- Parameters:
referenceName
- The reference name.- Returns:
- A reference like ".:/path/propName" instead of "currentProject:/path/propName". If there is not alias for the project, the same String as the input
referenceName
is returned.
getReferencePropName
Gets the reference property name, overridden when used in the Designer to skip the file storage property, and by the root property.- Specified by:
getReferencePropName
in interfaceIGProp<VALUE>
- Returns:
- A property reference string as "/path/propName" in the Server, "project:/path/propName" in the Designer.
getReferencePropNameNoAssert
Gets the reference property name, overridden when used in the Designer to skip the file storage property, and by the root property.This is exactly the same method as
getReferencePropName()
but without assertions.- Returns:
- A property reference string as "/path/propName" in the Server, "project:/path/propName" in the Designer.
getChildReferencePropName
Gets the child's reference property name for this property.- Parameters:
child
- The child requesting the name.- Returns:
- The default is to return getReferencePropName()+'/'+child.getPropName().
getPropFromReference
Gets a property from a reference name. This can be called from any property in the property tree, and will direct the request to the root property.- Specified by:
getPropFromReference
in interfaceIGProp<VALUE>
- Parameters:
ref
- The reference string.- Returns:
- The property with the reference in question, or null if not found.
getPropFromReference
Internal function for getPropFromReference(ref).Gets a property from a reference name. This can be called from any property in the property tree, and will direct the request to the root property.
- Parameters:
requestor
- The requestor.path
- The reference path.- Returns:
- The property with the reference in question, or null if not found.
getPropReferenceTarget
Retargets the reference request as required. This is used e.g. by the File property container to retarget the request to the data container.- Returns:
- By default, returns
this
, should never return null.
getPropFromPath
Finds a property in the tree of the requested name from a path specification, i.e. a string divided by "/" for child properties, e.g. "component/host/flag" would perhaps find the grand child "flag" property in the child "host" property located in the "component" property.The "part" as ".." specifies the parent property, if any, otherwise
null
is returned.The path may start with "project:/path" (for the Designer) or "/path", in which case the path is taken from the root.
The path may be relative or absolute, with or without a project specification.
- Specified by:
getPropFromPath
in interfaceIGProp<VALUE>
- Parameters:
path
- the path name of the property to locate in the tree.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified name is not found.
getPropFromPath
Finds a property in the tree of the requested name from a path specification, i.e. a string divided by "/" for child properties, e.g. "component/host/flag" would perhaps find the grand child "flag" property in the child "host" property located in the "component" property.The "part" as ".." specifies the parent property, if any, otherwise
null
is returned.The path may start with "project:/path" (for the Designer) or "/path", in which case the path is taken from the root.
The path may be relative or absolute, with or without a project specification.
- Parameters:
requestor
- The requestor.path
- The path name of the property to locate in the tree.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified name is not found.
isPropChildOf
Checks if this property is child of a parent property. The parent tree is searched.
- Specified by:
isPropChildOf
in interfaceIGProp<VALUE>
- Parameters:
parent
- The parent to check.- Returns:
- true if this property has
setParent
Sets the parent for this property. To remove the parent, set the parent to null.getParent
Gets the parent of this property.getParent
Gets the parent of this property with the requested type.getRootParent
Gets the root container in the property tree.- Specified by:
getRootParent
in interfaceIGProp<VALUE>
- Returns:
- PropCnr The root parent or null for none.
getRootParentNoAssert
Gets the root container in the property tree.This is the exact same method as
getRootParent()
except that AssertionError is never thrown when assertions are enabled.- Returns:
- PropCnr The root parent or null for none.
isProxied
public final boolean isProxied()Checks if a property is a child of a proxied property container. This is used e.g. in event dispatching if a remote event is received by GProp and should call onRemoteEvent or onEvent. The onRemoteEvent is NOT called when in a proxied property container.- Returns:
- true if a child of a ProxyPropCnr, false otherwise.
getAtomPath
Gets the atom path of this property.- Specified by:
getAtomPath
in interfaceIGProp<VALUE>
- Parameters:
stopAt
- Stop at this property container. If null the root is used.- Returns:
- An array of Atom's, null if
stopAt
is not a grand-parent.
getPropPath
Gets the parents to the root of this property.- Specified by:
getPropPath
in interfaceIGProp<VALUE>
- Parameters:
includeThisPropCnr
- If true and this property is an instance of PropCnr, it is added at the end of the array.- Returns:
- The array of parents, first element being the root parent, last the direct parent.
getPropPath
Gets the parents to the input property or the root of this property.- Specified by:
getPropPath
in interfaceIGProp<VALUE>
- Parameters:
includeThisPropCnr
- If true and this property is an instance of PropCnr, it is added at the end of the array.stop
- The property container to stop at (it will be included as the first element in the array).- Returns:
- The array of parents, first element being the input property or root parent, last the direct parent.
getEnvironment
Gets the environment properties. The default is to delegate the request to the parent container.- Specified by:
getEnvironment
in interfaceIGProp<VALUE>
- Returns:
- The EnvProps for the client/server environment or null if not found.
getPropIndex
public final int getPropIndex()Gets the index of this property in the parent container.- Specified by:
getPropIndex
in interfaceIGProp<VALUE>
- Returns:
- int, the index of this property in the parent container, -1 if no parent or not found.
onPropParentChanged
Called when the parent is changed for this class. The default implementation does nothing and must be overridden by subclasses.- Parameters:
oldParent
- The old parent (or null if none).newParent
- The new parent (or null if none).
moveProp
Moves this property container to another container, without changing the listeners. The event "PropMoveEvent" is fired. For a client connection, this results in two operations: one add and one remove event.This method is only intended for the designer, and the interface "com.iizigo.prop.IPropDesigner" must be implemented in both this container as well as the receiver.
During the move, two "onPropParentChanged" calls are done to the property, first to set parent to null, then to the new parent.
Note: This method is not thread-safe, but used in an "SWT-thread-safe'd" environment, in conjunction with Eclipse Data Structure Integrity within a project in a workspace, it is safe.
- Specified by:
moveProp
in interfaceIGProp<VALUE>
- Parameters:
moveToContainer
- The container to move this container to.- Returns:
- true for success, false for failure (e.g. property not found in the parent). true is returned even if there is no change in the move operation.
- Throws:
PropException
- If the destination container cannot receive this container due to duplicate name or that it is read-only. It is also thrown if this container has no parent or the parent is read-only.
moveProp
public final boolean moveProp(PropCnr moveToContainer, Atom newName, Atom reference, boolean isAfter) throws PropException Moves this property container to another container, without changing the listeners. The event "PropMoveEvent" is fired. For a client connection, this results in two operations: one add and one remove event.This method is only intended for the designer, and the interface "com.iizigo.prop.IPropDesigner" must be implemented in both this container as well as the receiver.
During the move, two "onPropParentChanged" calls are done to the property, first to set parent to null, then to the new parent.
Note: This method is not thread-safe, but used in an "SWT-thread-safe'd" environment, in conjunction with Eclipse Data Structure Integrity within a project in a workspace, it is safe.
- Specified by:
moveProp
in interfaceIGProp<VALUE>
- Parameters:
moveToContainer
- The container to move this container to.newName
- The new name of the property, null for same.reference
- The reference atom where to place the moved property (before or after), null indicates added last.isAfter
- Flag to move the property after reference (if non-null), otherwise it's before.- Returns:
- true for success, false for failure (e.g. property not found in the parent). true is returned even if there is no change in the move operation.
- Throws:
PropException
- If the destination container cannot receive this container due to duplicate name or that it is read-only. It is also thrown if this container has no parent or the parent is read-only.
moveProp
public final boolean moveProp(PropCnr moveToContainer, Atom newName, int destinationIndex) throws PropException Moves this property container to another container, without changing the listeners. The event "PropMoveEvent" is fired. For a client connection, this results in two operations: one add and one remove event.This method is only intended for the designer, and the interface "com.iizigo.prop.IPropDesigner" must be implemented in both this container as well as the receiver.
During the move, two "onPropParentChanged" calls are done to the property, first to set parent to null, then to the new parent.
Note: This method is not thread-safe, but used in an "SWT-thread-safe'd" environment, in conjunction with Eclipse Data Structure Integrity within a project in a workspace, it is safe.
- Specified by:
moveProp
in interfaceIGProp<VALUE>
- Parameters:
moveToContainer
- The container to move this container to.newName
- The new name of the property, null for same.destinationIndex
- The reference atom where to place the moved property (before or after), null indicates added last.- Returns:
- true for success, false for failure (e.g. property not found in the parent). true is returned even if there is no change in the move operation.
- Throws:
PropException
- If the destination container cannot receive this container due to duplicate name or that it is read-only. It is also thrown if this container has no parent or the parent is read-only.
onPropDispose
protected void onPropDispose()Called when a property is disposed of by delete/remove in a container, or by the dispose method.This call is done just at the end of the delete/remove routine in the container, without synchronization.
During this call, whatever components that e.g. the client needs to disposed of is done.
Subclasses needing to perform some intelligent operations upon deletion should do it by overloading this method and always call the
super.onPropDispose()
method.setChanged
public final void setChanged()Forces setting of the change flag. If the flag was cleared prior to this call, thesetChanged
will propagate to the topmost parent (if any).- Specified by:
setChanged
in interfaceIGProp<VALUE>
hasChanged
public final boolean hasChanged()Checks if the value has been changed since last time the other party was updated by a call toappend
or since last call to{link #resetChangedTree()}
.- Specified by:
hasChanged
in interfaceIGProp<VALUE>
- Returns:
- true if changed, false otherwise.
resetChangedTree
protected final void resetChangedTree()Forces clearing of the change flag for this property and all its children. The property container overrides this method and callsresetChangedTree
for all its children properties.isPropPrivateAtCreation
protected boolean isPropPrivateAtCreation()Called upon creation of the property to check it's private state. This is used by properties that are not distributed to the remote party.- Returns:
- true if the property should be set to private at creation, false for default.
setPropPrivate
public final boolean setPropPrivate(boolean on) Sets the flag indicating property is private.If property private flag is turned off and the property defines the property as private at creation, an error is logged and false is returned.
- Specified by:
setPropPrivate
in interfaceIGProp<VALUE>
- Parameters:
on
- flag indicating if it's private or not.- Returns:
- true for changed, false for no change.
setPrivateCreateRequiredProp
protected final void setPrivateCreateRequiredProp()Sets the flag indicating property requires a "create transaction" when sent to the other party (server to client or vice versa). This method is not overridable and only sets the create property flag for this property, i.e. doesn't affect any children.isPropPrivate
public final boolean isPropPrivate()Checks if this property is private, i.e. is not sent to the remote party (server to client or vice versa).- Specified by:
isPropPrivate
in interfaceIGProp<VALUE>
- Returns:
- true if the property is private, false otherwise.
isPropCommunicating
public boolean isPropCommunicating()Checks if this property container is used with the communication framework.- Specified by:
isPropCommunicating
in interfaceIGProp<VALUE>
- Returns:
- true if property is attached to a container that is communicating with a client, false otherwise.
setPropVolatile
public final void setPropVolatile()Sets the flag indicating property is "volatile" and is not written to XML. Setting this flag does not cause an event to be fired.isPropVolatile
public final boolean isPropVolatile()Checks if this property is volatile, i.e. not written to XML.- Returns:
- true if the property is volatile, false otherwise.
isPropVolatileOrEditorOnly
protected boolean isPropVolatileOrEditorOnly()Checks if this property is volatile, i.e. not written to XML, or if it is for editor-only.- Returns:
- true if the property is volatile or is used in the Editor only.
isPropVirtualized
public final boolean isPropVirtualized()Checks if this property has been virtualized.- Specified by:
isPropVirtualized
in interfaceIGProp<VALUE>
- Returns:
- true if the property is virtualized, false otherwise.
setPropUSER
protected final void setPropUSER(long userValue) Sets the flag indicating property is "PROP_USER_*. Setting this flag does not cause an event to be fired.- Parameters:
userValue
- The user value to add (bitwise).
removePropUSER
protected final void removePropUSER(long userValue) Removes the flag indicating property is "PROP_USER_*. Setting this flag does not cause an event to be fired.- Parameters:
userValue
- The user value to remove (bitwise).
isPropUSER
protected final boolean isPropUSER(long userValue) Checks if this property is "PROP_USER_*.- Parameters:
userValue
- The user value.- Returns:
true
if the bit value is set,false
otherwise.
setPropReadOnly
public final boolean setPropReadOnly(boolean on) Sets the flag indicating property is read-only.- Specified by:
setPropReadOnly
in interfaceIGProp<VALUE>
- Parameters:
on
- flag indicating if it's read-only or not.- Returns:
- true for changed, false for no change.
isPropReadOnly
public final boolean isPropReadOnly()Checks if this property is read-only.- Specified by:
isPropReadOnly
in interfaceIGProp<VALUE>
- Returns:
- true if read-only, false otherwise.
throwIfReadOnly
Throw an error if the property is read-only.- Throws:
PropTypeException
- if the property is read-only.
setPropNullable
public final boolean setPropNullable(boolean on) Sets the flag indicating property is nullable with setPropValue.- Specified by:
setPropNullable
in interfaceIGProp<VALUE>
- Parameters:
on
- flag indicating if it's nullable or not.- Returns:
- true for changed, false for no change.
isPropNullable
public final boolean isPropNullable()Checks if this property is nullable.- Specified by:
isPropNullable
in interfaceIGProp<VALUE>
- Returns:
- true if property is nullable, false otherwise.
setPropForEditor
public final void setPropForEditor(boolean on) Sets the flag indicating property is the Editor only.- Parameters:
on
- flag indicating if it's for the Editor only or not.
isPropForEditor
public final boolean isPropForEditor()Checks if this property is for the Editor only and should e.g. not be used or loaded in the Server.- Returns:
- Whether the property is intended to be used only by iiziGo Designer (Editor) or not.
getErrorsProp
Gets the error property from the parent. If not found, the property up to the root is searched and if found, that error property is returned. Several property containers, such as UIComp, override this method and creates the error property in its own container, and that error property is returned.- Specified by:
getErrorsProp
in interfaceIGProp<VALUE>
- Returns:
- The error property for this property or above in the property tree.
addPropError
Adds an error input to the property.- Specified by:
addPropError
in interfaceIGProp<VALUE>
- Parameters:
item
- The error item.- Returns:
- true for changed, false for no change.
getPropError
Gets the error input item with specified ID, for none specify empty string.- Specified by:
getPropError
in interfaceIGProp<VALUE>
- Parameters:
id
- The ID for the error, can be empty string (null means default empty string).- Returns:
- The error item for the ID, or null for not found.
removePropError
Removes an error input from the property.- Specified by:
removePropError
in interfaceIGProp<VALUE>
- Parameters:
id
- The error ID, null for default (empty string).- Returns:
- true for changed, false for no change or error ID not found.
getPropError
Gets the property error instance.- Specified by:
getPropError
in interfaceIGProp<VALUE>
- Returns:
- The error property instance null for no error.
setPropError
Sets all or clears the errors for the property. If theerror
instance is non-null, a check if done if theerror
instance is empty, and if so, changed to null, causing it to have the same effect as to callsetPropError(null)
.- Specified by:
setPropError
in interfaceIGProp<VALUE>
- Parameters:
error
- The error property or null to clear the errors.- Returns:
- true for changed, false for no change.
hasPropError
public final boolean hasPropError()Checks if this property has an error. If this property object has a registered errors, true is returned.- Specified by:
hasPropError
in interfaceIGProp<VALUE>
- Returns:
- true if an error is registered for the property.
getPropErrorSeverity
public final int getPropErrorSeverity()Gets the error severity of this property.- Specified by:
getPropErrorSeverity
in interfaceIGProp<VALUE>
- Returns:
- -1 for none, otherwise IPropErrorItem.INFO=0, WARNING=1, ERROR=2.
hasPropTreeError
public final boolean hasPropTreeError(boolean excludeExtends) Checks if any property in the tree below this property has an error.- Specified by:
hasPropTreeError
in interfaceIGProp<VALUE>
- Parameters:
excludeExtends
- Flag indicating the properties that originates from the Extends Framework should be excluded from the search.- Returns:
- true if any error is present in any property or their values.
getPropTreeErrorSeverity
public final int getPropTreeErrorSeverity(boolean excludeExtends) Gets the maximum error severity of this property or any property below.- Specified by:
getPropTreeErrorSeverity
in interfaceIGProp<VALUE>
- Parameters:
excludeExtends
- Flag indicating the properties that originates from the Extends Framework should be excluded from the search.- Returns:
- -1 for none, otherwise IPropErrorItem.INFO=0, WARNING=1, ERROR=2.
getErroredProps
Retrieves the properties containing errors.- Specified by:
getErroredProps
in interfaceIGProp<VALUE>
- Parameters:
list
- The list that will be filled in with the errored properties.excludeExtends
- Flag indicating the properties that originates from the Extends Framework should be excluded from the search.
getErroredPropItems
Retrieves the list of error items for this property and its children (if this property is a container).- Specified by:
getErroredPropItems
in interfaceIGProp<VALUE>
- Parameters:
list
- The list that will be filled with error items.excludeExtends
- Flag indicating the properties that originates from the Extends Framework should be excluded from the search.
setCreateRequiredProp
protected boolean setCreateRequiredProp()Sets the flag indicating property requires a "create transaction" when sent to the other party (server to client or vice versa).The property container overrides this method by first calling
super.setCreateRequiredProp()
thensetCreateRequiredProp
to all its children.- Returns:
- true for change, false for no change.
isPropCreateRequired
public final boolean isPropCreateRequired()Checks if this property requires a "create transaction" when sent to the other party (server to client or vice versa).- Specified by:
isPropCreateRequired
in interfaceIGProp<VALUE>
- Returns:
- true if the property needs creation for transactions, false otherwise.
setPrivateChangeEventProp
public final boolean setPrivateChangeEventProp(boolean on) Sets the flag indicating this property uses a "private" change event, i.e. doesn't inform the parent when value changes.- Specified by:
setPrivateChangeEventProp
in interfaceIGProp<VALUE>
- Parameters:
on
- flag indicates this is set (true) or cleared (false).- Returns:
- true for changed, false for no change.
hasPrivateChangeEventProp
public final boolean hasPrivateChangeEventProp()Checks the flag indicating this property uses a "private" change event, i.e. doesn't inform the parent when value changes.- Specified by:
hasPrivateChangeEventProp
in interfaceIGProp<VALUE>
- Returns:
- true if the change event is "private", false otherwise.
setConstraints
Sets the constraints for the property.This method must be overridden by subclasses in order to load the constraints properly if the constraints-string is not sufficient, i.e. that additional settings must be loaded from the XML Element.
- Specified by:
setConstraints
in interfaceIGProp<VALUE>
- Parameters:
constraints
- The constraints string from the properties definition.element
- The Element that loads the property class from the properties definition. Note that Element may benull
if the constructor isn't called from the PropertyFactory.- Returns:
- The constraints object for reuse by the
PropertyFactory
with a subsequentsetConstraints(Object)
call instead of to this method. This method always returnsnull
and must be overridden by subclasses. - Throws:
PropException
- For errors in the constraints definitions.
setConstraints
public void setConstraints(Object constraints, String prevConstraints, Element prevElement) throws PropException Sets the constraints for the property previously returned from the same constraints call tosetConstraints(String,Element)
with the same String and Element as this instance would require.This method must be overridden by subclasses in order to load the constraints properly if the constraints-string is not sufficient, i.e. that additional settings must be loaded from the XML Element.
- Specified by:
setConstraints
in interfaceIGProp<VALUE>
- Parameters:
constraints
- The constraints Object from the properties definition.prevConstraints
- The previous constraints string from the properties definition.prevElement
- The previous Element that loads the property class from the properties definition.- Throws:
PropException
- For errors in the constraints definitions.
getConstraints
Gets the constraints string for this property.This method must be overridden by subclasses in order to return something of interest, because this method by default returns
null
.- Specified by:
getConstraints
in interfaceIGProp<VALUE>
- Returns:
- The constraints string used to in
setConstraints
to initiate the constraints for this property.
setPropValue
Sets a new value for this property. If any listener is present and the value has changed compare to the last value, the listener is informed.- Specified by:
setPropValue
in interfaceIGProp<VALUE>
- Parameters:
newValue
- the new value.- Returns:
- boolean true for value has changed, false for same value as current value.
- Throws:
PropException
- When the new value doesn't validate correctly.PropTypeException
- If the property is read-only.
setPropValue
Sets a new value for this property. If any listener is present and the value has changed compare to the last value, the listener is informed.- Specified by:
setPropValue
in interfaceIGProp<VALUE>
- Parameters:
newValue
- The new value.trigger
- The trigger property, or null for none.- Returns:
- boolean true for value has changed, false for same value as current value.
- Throws:
PropException
- When the new value doesn't validate correctly.PropTypeException
- If the property is read-only.
isPropValueTreeLockNeeded
protected boolean isPropValueTreeLockNeeded()Checks if the tree needs to be locked when setting the property value.- Returns:
- false by default.
setPropValue
Sets a new value for this property. If any listener is present and the value has changed compare to the last value, the listener is informed.- Parameters:
newValue
- The new value.propMgr
- The property manager for remote change, null for local.- Returns:
- boolean true for value has changed, false for same value as current value.
- Throws:
PropException
- When the new value doesn't validate correctly.PropTypeException
- If the property is read-only.
onPropValueSet
Called when the property value is changed by theGProp
class. This method is typically overridden by subclasses to clear cached values of a representation of this value.Note: this method is called during a synchronized state of the class instance!
- Parameters:
oldValue
- The old value.
modifyPropValue
protected int modifyPropValue(Object oldValue, Object newValue, PropMgr propMgr) throws PropException Called when setting a new value for this property. This method is normally not overridden by subclasses, but e.g. for properties containing arrays, this may be handled here, in order not modify the "oldValue" (such as an array, but rather to change it with the data from the "newValue").- Parameters:
oldValue
- The old value.newValue
- The new value.propMgr
- The property manager for remote change, null for local.- Returns:
- 1 for value has changed, 0 for same value as current value, -1 for not processed. 2 can also be returned to indicate the current value has been modified with new contents. This is e.g. the case for the StringMapProp.
- Throws:
PropException
- when the new value doesn't validate correctly.
setPropValueIncognito
Sets a new value for this property. Any listeners present are not informed; this method is intended for setting the property value at reception of a transaction after having created the property instance. The changed state of the property is not affected.Note: no checking is done if the property is read-only, valid type or valid value or constraints!
- Parameters:
newValue
- the new value.- Throws:
NullPointerException
- when newValue is null.
validateProp
Validates the value to set by first callingvalidateType
, thenvalidateValue
and finally calling an optional validator (if set).Note: When this method is called, synchronization is done at the property itself, so no synchronization on the tree should be done. This method calls
validatePropertyType
andvalidatePropertyValue
in the property-synchronized code, so these methods should not synchronize the tree either.- Specified by:
validateProp
in interfaceIGProp<VALUE>
- Parameters:
newValue
- The new value to set.- Throws:
PropException
- when the new value doesn't validate correctly.
validatePropType
Validates the newValue against the property object type. Subclasses must override this method to perform optional value type validation.Note: When this method is called, synchronization is done at the property itself, so no synchronization on the tree should be done.
- Specified by:
validatePropType
in interfaceIGProp<VALUE>
- Parameters:
newValue
- The new value to set.- Throws:
PropTypeException
- when the new value isn't of the correct class.
validatePropValue
Validates the value to set. Subclasses can override this method to perform optional value validation. No validation is performed in this method.Note: When this method is called, synchronization is done at the property itself, so no synchronization on the tree should be done.
- Specified by:
validatePropValue
in interfaceIGProp<VALUE>
- Parameters:
newValue
- The new value to set.- Throws:
PropException
- when the new value doesn't validate correctly.
getPropValueObject
Gets the current value set, null for an uninitialized value.- Returns:
- Object the value or null for uninitialized value.
getPropValue
Gets the current value set, null for an uninitialized value.- Specified by:
getPropValue
in interfaceIGProp<VALUE>
- Returns:
- Object the value or null for uninitialized value.
getPropValue
Gets the property value in another class form than the "native" one. This method tries conversion of a "native" property value into another class type. This method is used when filling in a POJO variable (Plain Old Java Object Field) from a "native" property value.Subclasses overrides the method
getPropertyValue0
in order to provide the appropriate conversion.- Specified by:
getPropValue
in interfaceIGProp<VALUE>
- Parameters:
requestedType
- The requested class type of the property value, using appropriate conversion.- Returns:
- The property value in the requested class, after conversion.
- Throws:
IllegalArgumentException
- If the class is not supported by the property for conversion.Exception
- Other exceptions that could occur.
getPropValue0
Gets the property value in another class form than the "native" one. This method tries conversion of a "native" property value into another class type. This method is used when filling in a POJO variable (Plain Old Java Object Field) from a "native" property value.Subclasses overrides this method
getPropertyValue0
in order to provide the appropriate conversion.- Parameters:
value
- The property value.index
- The index in the Class array returned bygetValueClasses()
.- Returns:
- The property value in the requested class, after conversion.
- Throws:
Exception
- Other exceptions that could occur.
addPropListener
Adds a listener for the property.- Specified by:
addPropListener
in interfaceIGProp<VALUE>
- Parameters:
l
- The listener to add.
removePropListener
Removes a listener for the property.- Specified by:
removePropListener
in interfaceIGProp<VALUE>
- Parameters:
l
- The listener to remove.
onEventSelf
Called when a property event is send to this property.A subclass can override this method to perform appropriate processing and is not required to call
super.onEventSelf(e)
.- Specified by:
onEventSelf
in interfaceIGProp<VALUE>
- Parameters:
event
- The property event.
onRemoteEvent
Called when a remote property event should be processed by this property.A subclass can override this method to perform appropriate processing and is not required to call
super.onRemoteEvent(e)
.The onRemoteEvent is NOT called when in a proxied property container, but rather the normal onEventSelf method.
- Specified by:
onRemoteEvent
in interfaceIGProp<VALUE>
- Parameters:
event
- The remote event.
onEvent
Called when a property event is send to this property.If this property is disposed, no processing will take place.
This method checks the event's Operations to perform and handles it accordingly.
If, at any time, the event is canceled, the processing is stopped.
- Specified by:
onEvent
in interfaceEventListener
- Specified by:
onEvent
in interfaceIGProp<VALUE>
- Parameters:
event
- The property event.
onReferenceEvent
Called to perform reference resolving. A property should override this method if it needs to perform reference resolving and validation.Subclasses override this method and only subclasses extending
PropCnr
needs to callsuper.onReferenceEvent(ResolveReferenceEvent event)
.- Parameters:
event
- The resolve references event.
appendProp
Appends the property name and value and all its children to a transaction using thePropMgr
.- Parameters:
propertyManager
- the property manager instance.trans
- transaction to append the properties to.
appendPropValue
protected abstract void appendPropValue(PropMgr propertyManager, SendTransaction trans, Object value) Appends the property value and all its children to a transaction using theAtomManager
.This method must is overridden in all subclasses.
- Parameters:
propertyManager
- the property manager instance.trans
- transaction to append the properties to.value
- the value to append to the transaction, a reference to the current property value.
initializeValue
protected abstract boolean initializeValue(PropMgr propertyManager, ReadTransaction trans) throws ClassNotFoundException, InstantiationException, IllegalAccessException, PropException, NoSuchMethodException, InvocationTargetException, IllegalArgumentException Initializes the property value from a transaction.- Parameters:
propertyManager
- the property manager.trans
- the transaction to initialize the property with.- Returns:
- true if the value has changed, false otherwise.
- Throws:
ClassNotFoundException
- - if the class could not be found.IllegalAccessException
- - if the class or its nullary constructor is not accessible.InstantiationException
- - if this Class represents an abstract class, an interface, an array class, a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reason.ExceptionInInitializerError
- - if the initialization provoked by this method fails.SecurityException
- - If a security manager, s, is present and any of the following conditions is met:- invocation of s.checkMemberAccess(this, Member.PUBLIC) denies creation of new instances of this class,
- the caller's class loader is not the same as or an ancestor of the class loader for the current class and invocation of s.checkPackageAccess() denies access to the package of this class.
PropException
- - if the property cannot be initialized, because of erroneous data.NoSuchMethodException
InvocationTargetException
IllegalArgumentException
initializeGProp
Called to initialize the generic property from anElement
.This method initializes the generic property and then calls the
initializeProperty(AtomManager atomManager,Element element)
.The attributes following attributes are read from the Element for all properties.
- PROP_ATTR_STRING_READ_ONLY
- PROP_ATTR_STRING_PRIVATE
- PROP_ATTR_STRING_NULLABLE
- PROP_ATTR_STRING_EDITOR_PROP
- PROP_ATTR_STRING_INFORM_PARENT
- PROP_ATTR_STRING_ERRORED_NAME
- PROP_ATTR_STRING_EXTENDS_PRIVATE
- PROP_ATTR_STRING_EXTENDS_FINAL
These attributes are read from the Element for all property containers.
- PROP_ATTR_STRING_EXTENDS
An extra error Element "propError" is also be read for the property error(s).
- Specified by:
initializeGProp
in interfaceIGProp<VALUE>
- Parameters:
element
- TheElement
.- Throws:
PropException
- when the initialization fails.
getAttribute
Gets a attribute string.- Parameters:
element
- The element.name
- The attribute name.- Returns:
- null if not found.
initializeProp
Called to initialize the property from anElement
. The property should initialize itself from attributes and nodes with appropriate information.Subclasses should override this method if custom initialization is required.
The default implementation gets the attribute "value" and calls the methods
object=convertPropertyValue(string)
followed bysetPropertyValue(object)
.- Parameters:
element
- TheElement
.- Throws:
PropException
- when the initialization fails.
fromElementString
Called from theinitializeProperty(Element element)
method once the element String is retrieved from the "value" attribute of the element. Override this method to provide the appropriateString
toObject
conversion.The default implementation returns the
String
passed as the parameter.- Specified by:
fromElementString
in interfaceIGProp<VALUE>
- Parameters:
string
- the String value of the object from the String value attribute.- Returns:
- the Object in "native" property value form of the string value.
- Throws:
PropException
- when the conversion fails.
convertPropError
Creates and throws a PropertyException when theString
doesn't convert properly into a "native" Object.- Parameters:
string
- the string value.thrown
- the Exception that was thrown.- Returns:
- Never returns, but method definition returns an Object.
- Throws:
PropException
- - always, with the exception error text.
onPropTreeInitialized
Called when the property has initialized from the Element when streamed from an XML file, has had all (if any) children elements and nodes added as properties and that the property has been added into it's parent.This method does nothing and may be overridden by any subclasses to perform custom processing. The
PropertyContainer
calls all its children with this method in order to inform the tree.The
ExtendablePropertyContainer
overrides this method to load all extended containers.- Specified by:
onPropTreeInitialized
in interfaceIGProp<VALUE>
- Throws:
IOException
- For file errors.PropException
- When there is an initialization problem.
shouldSerializeToXML
protected boolean shouldSerializeToXML(int programType) Method used to check for serialization to XML. Override this method and return false to avoid writing the property to XML. The default is to write all properties.- Parameters:
programType
- From PropFactory.getProgramType(): 0=PropFactory.CLIENT
, 1=PropFactory.SERVER
or 2=PropFactory.EDITOR
.- Returns:
- true (default if not VOLATILE) to save to XML, false to avoid writing the property to XML.
initializeGElement
Called when the XML file for the property tree is serialized from properties. The property should fill attributes and nodes with appropriate information.This method initializes the generic property and then calls the
initializeElement(Element element)
.The attributes following attributes are set for the Element for all properties as required:
- PROP_ATTR_STRING_READ_ONLY
- PROP_ATTR_STRING_PRIVATE
- PROP_ATTR_STRING_NULLABLE
- PROP_ATTR_STRING_EDITOR_PROP
- PROP_ATTR_STRING_INFORM_PARENT
- PROP_ATTR_STRING_ERRORED_NAME
- PROP_ATTR_STRING_EXTENDS_PRIVATE
- PROP_ATTR_STRING_EXTENDS_FINAL
These attributes are set for the Element for all property containers as required.
- PROP_ATTR_STRING_EXTENDS
An extra error element "propError" may also be added for the property error(s).
- Specified by:
initializeGElement
in interfaceIGProp<VALUE>
- Parameters:
element
- The element.
initializeElement
Called when the XML file for the property tree is serialized from properties. The property should fill attributes and nodes with appropriate information.Subclasses should override this method if custom initialization is required.
- Parameters:
element
- TheElement
to initialize.
toElementString
Called from theinitializeElement(Element element)
method. Override this method to provide the appropriateObject
toString
conversion.The default implementation returns the
Object value.toString()
return code. If the value is null, null is returned.- Specified by:
toElementString
in interfaceIGProp<VALUE>
- Parameters:
value
- the value in the object to convert to a string.- Returns:
- the string corresponding to the object value, or null for a null value.
toNativeValue
Tries conversion of possibly accepted properties values using thesetPropertyValue
method into the most preferred property value type. If the input value already is of the preferred type, the same object is returned.Subclasses overrides the method
toNativeValue0
in order to provide the appropriate conversion.- Specified by:
toNativeValue
in interfaceIGProp<VALUE>
- Parameters:
value
- the input value to convert to native value.- Returns:
- The converted input value in the preferred property value object type.
- Throws:
NullPointerException
- If the input Object value is null.Exception
- Other exceptions.
toNativeValue0
Tries conversion of possibly accepted properties values using thesetPropertyValue
method into the most preferred property value type. If the input value already is of the preferred type, the same object is returned.Subclasses overrides the method
toNativeValue0
in order to provide the appropriate conversion.- Parameters:
value
- The input value to convert to native value.index
- The index in the array returned bygetValueClasses()
, or -1 if not found.- Returns:
- The converted input value in the preferred property value object type.
- Throws:
Exception
- For conversion exceptions.
getVSReference
Gets a VSReference instance from the container or any parent containers. The method is used byVSRelativeReference
to look up theVSReference
instance in order to resolve the relative path to the target property.This method needs to be overridden by subclasses of
PropCnr
that has a VSReference as property, e.g. theJSONInProp
class in the Web Service plug-in.The default is to re-target the call to the parent container, and if the root, a folder or a file property is reached,
null
is returned.- Specified by:
getVSReference
in interfaceIGProp<VALUE>
- Parameters:
refAtom
- The property asking for the VSReference.- Returns:
- The instance of the
VSReference
ornull
if unassigned.
getPropBaseReference
Gets a base property container reference instance from the container or any parent containers. The method is used byPropRelativeReference
to look up the reference instance in order to resolve the relative path to the target property.This method needs to be overridden by subclasses of
PropCnr
that has a PropRelativeReference as property, e.g. theScreenProp
class in the Terminal Core plug-in.The default is to re-target the call to the parent container, and if the root, a folder or a file property is reached,
null
is returned.- Specified by:
getPropBaseReference
in interfaceIGProp<VALUE>
- Returns:
- The instance of the
PropCnr
ornull
if unassigned.
hasCircularReferencesError
public final boolean hasCircularReferencesError()Checks if there is any presence of a circular reference error registered for the property made by e.g. theverify(PropVerification)
method.- Specified by:
hasCircularReferencesError
in interfaceIGProp<VALUE>
- Returns:
true
if there is at least one circular reference error, or a crossover to a circular reference,false
otherwise.
verify
Verifies this property. The check performed is the extension of classes and that no circular reference is present.setPropExtended
public final void setPropExtended(boolean on) Sets the flag indicating this property is extended. This flag means the property is originating from an Extends container initially.- Parameters:
on
- flag indicates this is set (true) or cleared (false).
isPropExtended
public final boolean isPropExtended()Checks the flag indicating this property is a property belonging to another container. This flag means the property is originating from an Extends container initially.- Specified by:
isPropExtended
in interfaceIGProp<VALUE>
- Returns:
- true if the property originates from the Extends container, false otherwise.
setPropExtendsPrivate
public final boolean setPropExtendsPrivate(boolean on) Sets the flag indicating property is a Extends Private property in the container when this property belongs to the Extends Framework. Extends Private properties are not transported to the container that extends the original container.- Specified by:
setPropExtendsPrivate
in interfaceIGProp<VALUE>
- Parameters:
on
- flag indicating if it's Extends Private or not.- Returns:
- true for changed, false for no change.
isPropExtendsPrivate
public final boolean isPropExtendsPrivate()Checks if this property is Extends Private in regards to the Extends Framework.- Specified by:
isPropExtendsPrivate
in interfaceIGProp<VALUE>
- Returns:
- true is the property has the Extends Private attribute.
isPropExtendsPrivateInRoot
public final boolean isPropExtendsPrivateInRoot()Checks if the property is Extends Private from this property and up to, but not including the "isExtendsRoot()" property container in the parent chain of properties.If using this method to search for Extends Private in the Extends "Source Container", use the method that uses a container as parameter instead:
isPropExtendsPrivateInRoot(PropCnr root)
.- Specified by:
isPropExtendsPrivateInRoot
in interfaceIGProp<VALUE>
- Returns:
- true if a property in the hierarchy between the extends root (excluded), and this property, the
isPropExtendsPrivate()
method would return true. It is false if no Extends Private exists, or if the root is not found.
isPropExtendsPrivateInRoot
Checks if the property is Extends Private from this property and up to, but not including the "isExtendsRoot()" property container in the parent chain of properties.- Specified by:
isPropExtendsPrivateInRoot
in interfaceIGProp<VALUE>
- Parameters:
root
- The root to use if an alternate one is required, otherwise set to null for root look-up (note: this works only in the target container, not for the source container).- Returns:
- true if a property in the hierarchy between the extends root (excluded), and this property, the
isPropExtendsPrivate()
method would return true. It is false if no Extends Private exists, or if the root is not found.
setPropExtendsFinal
public final boolean setPropExtendsFinal(boolean on) Sets the flag indicating property is a Extends Final property in the container when this property belongs to the Extends Framework. Extends Final properties cannot be modified in containers that extends the original container, and to clarify, the Extends Final properties are set in the original container's properties or the container itself.- Specified by:
setPropExtendsFinal
in interfaceIGProp<VALUE>
- Parameters:
on
- flag indicating if it's Extends Final or not.- Returns:
- true for changed, false for no change.
isPropExtendsFinal
public final boolean isPropExtendsFinal()Checks if this property is Extends Final in regards to the Extends Framework.- Specified by:
isPropExtendsFinal
in interfaceIGProp<VALUE>
- Returns:
- true is the property has the Extends Final attribute.
getExtendsRootContainer
Searches for an Extends container for a property. The parent tree is searched for a container withPropCnr.isExtendsRoot()
, including this property (if it's a container).The search is ended with a "not found"
null
return code if a property file, folder or root is found (i.e.isPropFile()
,isPropFolder()
orisPropRoot()
returns true).- Specified by:
getExtendsRootContainer
in interfaceIGProp<VALUE>
- Returns:
- The Extends container root, or
null
if such a container is not found.
getPropExtendsFlags
public int getPropExtendsFlags()Checks if this property extends another property, and if so gets the extends flags. This call is only interesting to do in the Designer where the Extends Framework is used. It requires a little processing, so do not call it too often if not required.- Specified by:
getPropExtendsFlags
in interfaceIGProp<VALUE>
- Returns:
- A value with the flags in the bit-values below:
- EXT_EXTENDED - Extended property.
- EXT_PRIVATE - Private Extends.
- EXT_FINAL - Final Extends.
- EXT_OVERRIDES - Overrides a source property.
- EXT_OVERRIDES_FINAL_ERR - Overrides a source property that is final = error.
- EXT_CONTAINER_EXTENDS - Container extends another container (only for containers)
- EXT_CONTAINER_EXTENDS_VALID - Container extends another container, and reference is valid (only for containers).
paramString
Returns the parameter string representing the state of this event. This string is useful for debugging. Subclasses adds extra information to the string by preceding it with a comma followed by the extra information.- Returns:
- the parameter string of this event.
paramString
Returns the parameter string representing the state of this event. This string is useful for debugging. Subclasses adds extra information to the string by preceding it with a comma followed by the extra information.- Parameters:
includeFullProperties
- Flag to include full properties or not.- Returns:
- the parameter string of this event.
paramValue
Formats the value as a string to add toparamString
. The default is to do "value.toString()" if value is not null, otherwise "[null]" is returned.- Parameters:
value
- The property value.- Returns:
- The String representation of the value.
toString
The toString representation without risk of causing a StackOverflow in case of round-robbin scenarios.- Parameters:
prop
- The property instance or null for none.- Returns:
- The short version of PropReference.toString(false) if non-null, otherwise "null".
toString
Returns a string representation of this component and its values.equals
Checks for equality, including private properties. Use the methodequals(Object,boolean=false)
not to include the private properties.equals
Checks for equality.equalsObj
Checks for equality.- Parameters:
o
- The other property to compare with.how
- Flags EQC_* values for equal checking.- Returns:
- The non-equal object: Atom, Atom [], or property.
equalsErrors
Processes error property verification. The default processing is to verify the two error propertiespe1
andpe2
for equality ifincludeErrors
is 0 or 1, and returns true if the value is 2=no comparison with error properties.Override to verify property errors for reference properties.
- Parameters:
pe1
- The first error property, may be null.pe2
- The second error property, may be null.how
- Flags EQC_* values for equal checking.- Returns:
- Equality flag depending on
includeErrors
value.
equalValues
Checks for property value equality. The object is of the correct type for the respective property type. The Atoms and other properties such as Private/Extends has already been checked for equality or correctness.- Parameters:
compareTo
- The comparing-to property that contains the value.thisValue
- This property value (for synchronization reasons).compareValue
- Another property value.how
- Flags EQC_* values for equal checking.- Returns:
- The property not being equal, null for equal (both values null).
equalsPropValue
Checks if another value is equal to the value in this object. Do not use this method to compare two property containers as this may not be an accurate method. This method is intended to be used for plain property value comparisons.- Parameters:
otherPropValue
- The value to compare with.- Returns:
- true if the values are equal, false otherwise.
equalsTree
Checks for equality in the whole container structure.- Parameters:
pc
- Another property container.how
- Flags EQC_* values for equal checking.- Returns:
- Both atom and value are equal on all levels.
list
public void list()Prints a listing of this property to the standard system output streamSystem.out
.list
Prints a listing of this property to the specified output stream.list
Prints out a list, starting at the specified indentation, to the specified print stream.list
Prints a listing to the specified print writer.list
Prints out a list, starting at the specified indentation, to the specified print writer.finest
Logs a finest event.finest
Logs a finest event.finer
Logs a finer event.finer
Logs a finer event.fine
Logs a fine event.fine
Logs a fine event.info
Logs an informational event.info
Logs an informational event.warning
Logs a warning event.warning
Logs a warning event.warning
Logs a warning event.severe
Logs a severe event.severe
Logs a severe event.severe
Logs a severe event.triggerRemoteEvent
public void triggerRemoteEvent(int localID) Triggers a remote event for execution at the remote partyonRemoteEvent()
method of this remote property instance.- Specified by:
triggerRemoteEvent
in interfaceIGProp<VALUE>
- Parameters:
localID
- The property-local event ID.
triggerRemoteEvent
Triggers a remote event for execution at the remote partyonRemoteEvent()
method of this remote property instance.- Specified by:
triggerRemoteEvent
in interfaceIGProp<VALUE>
- Parameters:
localID
- The property-local event ID.params
- Parameters for the event, null for none.