Class VirtualSpace
- All Implemented Interfaces:
IPrivateStorage,EventListener,IFocusComp,IMessageBox,IClassReferenceOwner,ICustomDataProvider,IGProp<GProp<?>[]>,IPropCnr,IVSAccessor,IVSClassReferenceOwner,IVSComponent,IVSComponentListener,IVSComponentState,IVSMessageComponent,Cloneable
- Direct Known Subclasses:
EditorVirtualSpace
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox
IMessageBox.IconNested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState
IVSComponentState.StateField Summary
FieldsModifier and TypeFieldDescriptionstatic final AtomThe focus mapper class property atom: "$mapClass".protected VSParticipantsHolderThe participants holder.Fields inherited from class com.iizix.prop.PropCnr
EMPTY, EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_ID, nameTableFields inherited from class com.iizix.prop.GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2Fields inherited from interface com.iizix.prop.IClassReferenceOwner
RETRIEVE_CLASS_REFERENCE_INSTANCEFields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATEFields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNINGFields inherited from interface com.iizix.prop.vs.IVSComponent
ATOM_IGNORE_UI_FOCUS, ERROR, INFORMATION, NONE, WARNINGConstructor Summary
ConstructorsConstructorDescriptionCreates the VirtualSpace property container without a name.VirtualSpace(Atom propertyAtom) Creates the VirtualSpace property container with the specified name.Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds the predefined properties for this container.booleanareFree(Runnable callback, boolean callbackIfFree, VSComponent... components) Verifies if the component(s) is/are included in a work unit currently in progress in this VirtualSpace.booleanareFree2(Runnable callback, boolean callbackIfFree, VSComponent component, VSComponent... components) Verifies if the components are included in a work unit currently in progress in this VirtualSpace.Returns if this component can receive focus.clone()Clones the property.protected GProp<?>convertLoadedProp(GProp<?> childProp) Enables conversion or omission of a property loaded from XML.couldRequestFocusIfVirtualized(boolean ignoreStates) Returns if this component could receive focus if it would be virtualized.protected VSParticipantsHolderCreates a new instance of the VSParticipantsHolder.createVSReference(Atom refAtom, PropCnr[] returnParent) Creates a VSReference instance from the container or any parent containers.forbiddenGetCustomDataMap(boolean doCreate) Deprecated.Gets the action with the specified path.getAction2(@FullVSRef String fullVSRef) Gets the action with the specified full VS reference path.getActionNull(@VSRef String path) Gets the action with the specified path.getActionNull2(@FullVSRef String fullVSRef) Gets the action with the specified full VS reference path.Returns the Application Session Gyro instance of this virtualized property.Gets the attached panels of this current instance of the VirtualSpace.Returns the Client Session Gyro instance.Gets the field with the specified path.getField2(@FullVSRef String fullVSRef) Gets the field with the specified full VS reference path.getFieldNull(@VSRef String path) Gets the field with the specified path.getFieldNull2(@FullVSRef String fullVSRef) Gets the field with the specified full VS reference path.Returns the instance for the VirtualSpace focus handler.Gets the group with the specified path.getGroup2(@FullVSRef String fullVSRef) Gets the group with the specified full VS reference path.getGroupNull(@VSRef String path) Gets the group with the specified path.getGroupNull2(@FullVSRef String fullVSRef) Gets the group with the specified full VS reference path.Gets the non-virtualized instance of this component, i.e.Gets participants holder container.protected voidGets potential references to predefined properties for this container.Gets the concurrent hash map used to store the private data.Gets the table with the specified path.getTable2(@FullVSRef String fullVSRef) Gets the table with the specified full VS reference path.getTableNull(@VSRef String path) Gets the table with the specified path.getTableNull2(@FullVSRef String fullVSRef) Gets the table with the specified full VS reference path.Gets the virtualized instance of this component, i.e.getVirtualized(boolean doVirtualize) Gets the virtualized instance of this component, i.e.Gets a virtualized VirtualSpace for the application session from this virtualized VirtualSpace.Gets the VirtualSpace.<COMP extends IVSComponent>
COMPgetVSComponent(@VSRef String path, Class<COMP> clazz) Gets the VS component with the specified path.<COMP extends IVSComponent>
COMPgetVSComponent2(@FullVSRef String fullVSRef, Class<COMP> clazz) Gets the VS component with the specified full reference path.<COMP extends IVSComponent>
COMPgetVSComponentNull(@VSRef String path, Class<COMP> clazz) Gets the VS component with the specified path.<COMP extends IVSComponent>
COMPgetVSComponentNull2(@FullVSRef String fullVSRef, Class<COMP> clazz) Gets the VS component with the specified full reference path.getVSReference(Atom refAtom) Gets the VSReference to this VirtualSpace.protected final voidMethod called at the earliest possible stage in the constructor of a container property or it's extending classes, before possible initialization of other properties, etc.booleanisFree(Runnable callback, boolean callbackIfFree, VSComponent component) Verifies if the component is included in a work unit currently in progress in this VirtualSpace.voidonEventSelf(GEvent event) Checks for state change events and fires it to listeners.voidonFocusGained(IFocusComp opposite, IGProp<?> trigger, boolean isRemoteInduced) Called to the component when it receives focus.voidonFocusLost(IFocusComp focusComp, IGProp<?> trigger, boolean isRemoteInduced) Called to the focused component when it loses focus.booleanonPanelDestroyed(UIPanelBase panel) Called when a panel is destroyed after being virtualized and attached to the VirtualSpace.booleanonPanelVirualized(UIPanelBase panel) Called when a panel has been virtualized.voidonParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on) Called when the column changes state.protected voidonPrepare(IAppOwner appOwner, IModuleOwner moduleOwner, boolean isPostCall, List<Throwable> errors) Called when the application is being prepared.protected voidCalled when a property is disposed of by delete/remove in a container, or by the dispose method.voidonRemoteEvent(RemoteEvent event) Called when a remote property event should be processed by this property.protected voidonVirtualizationCompleted(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, boolean isPostResolve) Called when virtualization completed.final VirtualSpacevirtualize(IAppSessionGyro appGyro) Call this method to "virtualize" a property tree.protected final VirtualSpacevirtualize(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace) Call this method to "virtualize" a property tree.Methods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, completeVirtualize, containsProp, containsProp, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, equalsTree, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, hasFocus, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isSibling, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualContainerCreated, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocus, requestFocusEx, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldCreateProps, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verify, verifyInternalUseOnly, verifyTreeMethods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, extendsClone, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onPropInvalidateCache, onPropParentChanged, onPropValueSet, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warningMethods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.iizix.prop.IClassReferenceOwner
getClassReference, getClassReferenceRuntimeInstance, getProp, getRuntimeClassInstance, getRuntimeClassInstanceMethods inherited from interface com.iizix.prop.ICustomDataProvider
getCustomData, putCustomData, putCustomDataIfAbsentMethods inherited from interface com.iizix.gyro.IFocusComp
requestFocus, requestFocus, requestFocusEx, requestFocusExMethods inherited from interface com.iizix.prop.IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAtomPath, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, getValueClasses, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, list, list, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onPropTreeInitialized, removePropError, removePropListener, renameProp, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toElementString, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropType, validatePropValue, verify, warning, warning, warningMethods inherited from interface com.iizix.gyro.IMessageBox
messageBox, messageBoxMethods inherited from interface com.iizix.api.IPrivateStorage
getPrivateData, getPrivateData, setPrivateDataMethods inherited from interface com.iizix.prop.IPropCnr
addProp, addProp, addProp2, addProp2, canRequestFocus, canRequestFocus, containsProp, containsProp, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, enablePropCommunication, enablePropHashMap, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsError, getExtendsName, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropCnr, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getString, getString, getString, getString, hasFocus, initializeExtendsFramework, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsRoot, isPropAddRemoveAllowed, isPropExtended, isSibling, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, requestFocus, requestFocusEx, setBool, setBool, setBool, setBool, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, usePropHashMap, usesPropIndex, validateClassInstancesMethods inherited from interface com.iizix.prop.vs.IVSClassReferenceOwner
getClassReference, getClassReferenceAtom, getClassReferenceImplementsInterface, getClassReferenceRequiredAnnotation, isClassReferenceAnnotationBackReferenceRequiredMethods inherited from interface com.iizix.prop.vs.IVSComponent
getDescription, getVSRef, isEnabled, isEnabledInParent, isReadOnly, isReadOnlyInParent, isSelected, isVisible, isVisibleInParent, messageBox, setEnabled, setEnabled, setIgnoreFocusFromUI, setReadOnly, setReadOnly, setSelected, setSelected, setVirtualizeSupportFocus, setVirtualizeSupportFocus, setVisible, setVisible, shouldIgnoreFocusFromUIMethods inherited from interface com.iizix.prop.vs.IVSMessageComponent
clearMessage, getMessage, getMessageCategory, getMessageString, isValid, setErrorMessage, setMessage, setMessage
Field Details
MAP_CLASS_PROP_ATOM
The focus mapper class property atom: "$mapClass".participantsHolder
The participants holder.
Constructor Details
VirtualSpace
public VirtualSpace()Creates the VirtualSpace property container without a name. The name must be set in all cases using thesetPropertyAtomcall.VirtualSpace
Creates the VirtualSpace property container with the specified name. All system-reserved names for components begins with "$".- Parameters:
propertyAtom- the name of the component, unique within it's parent.
Method Details
initPropCnr
protected final void initPropCnr()Method called at the earliest possible stage in the constructor of a container property or it's extending classes, before possible initialization of other properties, etc.The VirtualSpace use the named property hash map for lookup of properties fast.
- Overrides:
initPropCnrin classPropCnr
convertLoadedProp
Enables conversion or omission of a property loaded from XML.This method is typically used to process changes of e.g. property types, e.g. from IntProp to NumberProp, in case of a change of property definitions.
- Overrides:
convertLoadedPropin classPropCnr- Parameters:
childProp- The child property that is about to be added.- Returns:
- The property to add, null to omit it. The default processing is to return the same property, i.e.
childProp. - Throws:
PropException- for property errors.
getVirtualSpace
Gets the VirtualSpace.- Specified by:
getVirtualSpacein interfaceIVSAccessor- Specified by:
getVirtualSpacein interfaceIVSComponent- Returns:
- This instance.
getVSReference
Gets the VSReference to this VirtualSpace.- Specified by:
getVSReferencein interfaceIGProp<GProp<?>[]>- Overrides:
getVSReferencein classPropCnr- Parameters:
refAtom- The reference atom (unused).- Returns:
- A fake VSReference that references this VirtualSpace instance.
createVSReference
Creates a VSReference instance from the container or any parent containers. The method is used in the Designer to create a VirtualSpace connection forVSRelativeReferenceto look up theVSReferenceinstance in order to resolve the relative path to the target property.This method needs to be overridden by subclasses of
PropCnrthat has a VSReference as property, and *SHOULD* matchgetVSReference(Atom).The default is to re-target the call to the parent container, and if the root, a folder or a file property is reached,
nullis returned.- Overrides:
createVSReferencein classPropCnr- Parameters:
refAtom- The property asking for the VSReference.returnParent- An array of PropCnr [1] that will be filled in with the parent property of the VSRefernce.- Returns:
- The instance of the
VSReferenceornullif unassigned. The returned instance could also be a VSParticipant and should therefore be processed accordingly.For this method, it's always null!
createVSParticipantsHolder
Creates a new instance of the VSParticipantsHolder.addPredefinedProps
Adds the predefined properties for this container. This method is called once just after construction of the property container and sometimes population of it.The method should add properties to create or get reference to using the
maybeAddPropmethod. When the PropCnr instance is cloned, the methodgetPredefinedProps()is called in order for the subclass to be able to retrieve the new instances to these properties, if stored in instance variables.- Overrides:
addPredefinedPropsin classPropCnr- Throws:
PropException- for property exceptions.
getPredefinedProps
protected void getPredefinedProps()Gets potential references to predefined properties for this container. This method is called once just after cloning of the property container.The method should get reference to using the
getProp(...)methods. This allows the subclass to be able to retrieve the new instances to the properties created duringaddPredefinedProps()if stored in instance variables.- Overrides:
getPredefinedPropsin classPropCnr
isFree
Verifies if the component is included in a work unit currently in progress in this VirtualSpace.- Parameters:
callback- The callback to call when work completes, or null for none.callbackIfFree- Performs a call to the callback if free when true.component- The component to verify.- Returns:
- true if it's OK to process, false means the component is included in this work unit and if
callbackis non-null, it will be called. Thecallbackis called if free and the flagcallbackIfFreeis true.
areFree
Verifies if the component(s) is/are included in a work unit currently in progress in this VirtualSpace.- Parameters:
callback- The callback to call when work completes, or null for none.callbackIfFree- Performs a call to the callback if free when true.components- The components to verify.- Returns:
- true if it's OK to process, false means the component is included in this work unit and if
callbackis non-null, it will be called. Thecallbackis called if free and the flagcallbackIfFreeis true.
areFree2
public boolean areFree2(Runnable callback, boolean callbackIfFree, VSComponent component, VSComponent... components) Verifies if the components are included in a work unit currently in progress in this VirtualSpace.- Parameters:
callback- The callback to call when work completes, or null for none.callbackIfFree- Performs a call to the callback if free when true.component- A component to verify.components- The components to verify.- Returns:
- true if it's OK to process, false means the component is included in this work unit and if
callbackis non-null, it will be called. Thecallbackis called if free and the flagcallbackIfFreeis true.
onEventSelf
Checks for state change events and fires it to listeners.- Specified by:
onEventSelfin interfaceIGProp<GProp<?>[]>- Overrides:
onEventSelfin classGProp<GProp<?>[]>- Parameters:
event- The property event.
onParentStateChanged
Called when the column changes state.- Specified by:
onParentStateChangedin interfaceIVSComponentListener- Parameters:
parent- The parent who's state was changed.state- The state change, possible values PARENT_ENABLED, PARENT_READONLY, PARENT_VISIBLE.on- New state.
canRequestFocus
Returns if this component can receive focus. Focus capable components may override to returnnullfor success, or other error message.Default processing is to return "Component not focusable" if the component doesn't implement the
IFocusCompinterface, "Not virtualized" if the component is not in a virtualized state, "Component is hidden" ifIVSComponent.isVisible()isfalseor "Component is disabled" ifIVSComponent.isEnabled()isfalse.- Specified by:
canRequestFocusin interfaceIPropCnr- Returns:
nullfocus is possible to this component, or an error message describing why focus cannot be requested.
couldRequestFocusIfVirtualized
Returns if this component could receive focus if it would be virtualized. Focus capable components may override to returnnullfor success, or other error message.Default processing is to return "Component not focusable" if the component doesn't implement the
IFocusCompinterface, "Component is hidden" ifIVSComponent.isVisible()isfalseor "Component is disabled" ifIVSComponent.isEnabled()isfalse.- Specified by:
couldRequestFocusIfVirtualizedin interfaceIPropCnr- Parameters:
ignoreStates- Flag indicating that states should be ignored, such as visible or enabled. If false, hidden or disabled components return an error message.- Returns:
nullfocus is possible to this component, or an error message describing why focus cannot be requested.
onFocusGained
Called to the component when it receives focus.Focus components override this method if they need to process focus lost.
- Specified by:
onFocusGainedin interfaceIFocusComp- Parameters:
opposite- Component losing focus, null for none.trigger- The trigger property, null for none.isRemoteInduced- Flag indicating this event is due to a remote event.
onFocusLost
Called to the focused component when it loses focus.Focus components override this method if they need to process focus lost.
- Specified by:
onFocusLostin interfaceIFocusComp- Parameters:
focusComp- Component receiving focus, null for none.trigger- The trigger property, null for none.isRemoteInduced- Flag indicating this event is due to a remote 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:
onRemoteEventin interfaceIGProp<GProp<?>[]>- Overrides:
onRemoteEventin classGProp<GProp<?>[]>- Parameters:
event- The remote event.
forbiddenGetCustomDataMap
Deprecated.Gets or creates the provider map. This method is not intended to be called by user code, it is used by the system.Do not call this method!
- Specified by:
forbiddenGetCustomDataMapin interfaceICustomDataProvider- Parameters:
doCreate- Creates the map if required.- Returns:
- The map or newly created map,
nullif not created.Note: the map returned is NOT synchronized thus not thread safe. It is up to the caller to synchronize on it to ensure thread safety.
clone
Clones the property.virtualize
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 v, but also virtual instances of panels, for the individual client session. The v 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 v 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.- Throws:
NullPointerException- If appGyro is null.
virtualize
protected final VirtualSpace virtualize(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace) throws 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.
NEVER CALL THIS METHOD: it will always throw PropException.
- Overrides:
virtualizein classPropCnr- Parameters:
appGyro- The application gyro instance performing the virtualization.clientGyro- The client gyro session, can benullif not initialized from the client gyro.virtualSpace- The virtualized VirtualSpace.- Returns:
- Never returns anything: the PropException is always thrown.
- Throws:
PropException- For property errors during the virtualization.
getNonVirtualized
Gets the non-virtualized instance of this component, i.e. a VirtualSpace.- Specified by:
getNonVirtualizedin interfaceIVSComponent- Returns:
- The non-virtualized VirtualSpace, always non-null.
getVirtualized
Gets the virtualized instance of this component, i.e. a VirtualSpace.If this VirtualSpace already is virtualized, the same instance is returned.
If the VirtualSpace in the application session is not virtualized, this method returns
null. Use the methodwithgetVirtualized(boolean)trueas parameter to also perform the virtualization.This method can return null, but not when called from an application session context, i.e. any kind of threads running in the server for an application. This means that you should not require to test for
nullin the code.- Returns:
- The virtualized VirtualSpace, null if Application Session Gyro cannot be found for current thread.
getVirtualized
Gets the virtualized instance of this component, i.e. a VirtualSpace.If this VirtualSpace already is virtualized, the same instance is returned.
This method can return null, but not when called from an application session context, i.e. any kind of threads running in the server for an application. This means that you should not require to test for
nullin the code.- Parameters:
doVirtualize- Flag to virtualize the VirtualSpace if not yet virtualized in the application session.- Returns:
- The virtualized VirtualSpace, null if Application Session Gyro cannot be found for current thread.
getAppSessionGyro
Returns the Application Session Gyro instance of this virtualized property.NOTE: Use the code
to get the application session gyro derived from the current thread (and thread group). This will work for all threads in an application session environment in the server.IAppSessionGyro.getSessionInstance()- Specified by:
getAppSessionGyroin interfaceIGProp<GProp<?>[]>- Overrides:
getAppSessionGyroin classGProp<GProp<?>[]>- Returns:
- The Application Session Gyro if this instance is virtualized,
nullotherwise.
getClientSessionGyro
Returns the Client Session Gyro instance.This method calls
to retrieve the instance from the current thread.IClientSessionGyro.getSessionInstance()- Specified by:
getClientSessionGyroin interfaceIGProp<GProp<?>[]>- Overrides:
getClientSessionGyroin classGProp<GProp<?>[]>- Returns:
- The Client Session Gyro if found for the current thread,
nullotherwise.
onPanelVirualized
Called when a panel has been virtualized. Do no call this method, it is intended for the framework.- Parameters:
panel- The panel virtualized.- Returns:
- Success flag.
onPanelDestroyed
Called when a panel is destroyed after being virtualized and attached to the VirtualSpace.- Parameters:
panel- The panel virtualized being destroyed.- Returns:
- Success flag.
getAttachedVirtualizedPanels
Gets the attached panels of this current instance of the VirtualSpace.- Returns:
- The array of panels for all client sessions connected to this VirtualSpace of the same user and app session.
getVirtualizedVirtualSpace
Gets a virtualized VirtualSpace for the application session from this virtualized VirtualSpace. The VirtualSpace to get MUST already have been virtualized prior to this call.- Specified by:
getVirtualizedVirtualSpacein interfaceIVSComponent- Parameters:
path- The path of the VirtualSpace name relative the parent of the current VirtualSpace. This path can be e.g. just a plain name for a direct sibling of this VirtualSpace, a folder based path such as "folder/virtualSpaceB" or a full reference path as "module:/vs/[folderPath/]virtualSpace".- Returns:
- The VirtualSpace with the specified path, never null.
- Throws:
NotFoundException- If the VirtualSpace is not found within the virtualized VirtualSpaces.IllegalStateException- If this VirtualSpace is not virtualized or the application session gyro is not found.IllegalArgumentException- If path is invalid.
getParticipantsHolder
Gets participants holder container.onPrepare
protected void onPrepare(IAppOwner appOwner, IModuleOwner moduleOwner, boolean isPostCall, List<Throwable> errors) throws PropException Called when the application is being prepared. The order ofonPreparecalls is always parent first, the children. The method is called twice, first time withisPostCallset tofalse, then a second time withtrue.- Overrides:
onPreparein classGProp<GProp<?>[]>- 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.
onVirtualizationCompleted
protected void onVirtualizationCompleted(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, boolean isPostResolve) Called when virtualization completed.This method is called to the entire tree of the newly virtualized property container.
- Overrides:
onVirtualizationCompletedin classPropCnr- Parameters:
appGyro- The application gyro instance performing the virtualization.clientGyro- The client gyro session, can benullif not initialized from the client gyro.virtualSpace- The virtualized VirtualSpace.isPostResolve- Flag indicating this call is done after references are attempted to be resolved.
onPropDispose
protected void onPropDispose()Called when a property is disposed of by delete/remove in a container, or by the dispose method.The Property Container clears the structure of unsent communication requests to clear memory.
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.- Overrides:
onPropDisposein classPropCnr
getFocusHandler
Returns the instance for the VirtualSpace focus handler.- Returns:
- The instance to use for this VirtualSpace, null for none.
getField
Gets the field with the specified path.- Specified by:
getFieldin interfaceIVSComponent- Parameters:
path- The path to the field in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The field, never null.
- Throws:
NotFoundException- If the field is not found.
getFieldNull
Gets the field with the specified path.- Specified by:
getFieldNullin interfaceIVSComponent- Parameters:
path- The path to the field in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The field, null if not found.
getField2
Gets the field with the specified full VS reference path.- Specified by:
getField2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".- Returns:
- The field, never null.
- Throws:
NotFoundException- If the field is not found.
getFieldNull2
Gets the field with the specified full VS reference path.It is preferable to use
getField2(String)instead of this method if the field always should be present because it will throw and log errors.- Specified by:
getFieldNull2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".- Returns:
- The field, null if not found.
getTable
Gets the table with the specified path.- Specified by:
getTablein interfaceIVSComponent- Parameters:
path- The path to the table in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The table, never null.
- Throws:
NotFoundException- If the table is not found.
getTableNull
Gets the table with the specified path.- Specified by:
getTableNullin interfaceIVSComponent- Parameters:
path- The path to the table in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The table, null if not found.
getTable2
Gets the table with the specified full VS reference path.- Specified by:
getTable2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the table in the VirtualSpace, as "module:/vs/path".- Returns:
- The table, never null.
- Throws:
NotFoundException- If the table is not found.
getTableNull2
Gets the table with the specified full VS reference path.It is preferable to use
getTable2(String)instead of this method if the table always should be present because it will throw and log errors.- Specified by:
getTableNull2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the table in the VirtualSpace, as "module:/vs/path".- Returns:
- The field, null if not found.
getAction
Gets the action with the specified path.- Specified by:
getActionin interfaceIVSComponent- Parameters:
path- The path to the action in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The action, never null.
- Throws:
NotFoundException- If the action is not found.
getActionNull
Gets the action with the specified path.- Specified by:
getActionNullin interfaceIVSComponent- Parameters:
path- The path to the action in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The action, null if not found.
getAction2
Gets the action with the specified full VS reference path.- Specified by:
getAction2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the action in the VirtualSpace, as "module:/vs/path".- Returns:
- The action, never null.
- Throws:
NotFoundException- If the action is not found.
getActionNull2
Gets the action with the specified full VS reference path.It is preferable to use
getAction2(String)instead of this method if the action always should be present because it will throw and log errors.- Specified by:
getActionNull2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".- Returns:
- The action, null if not found.
getGroup
Gets the group with the specified path.- Specified by:
getGroupin interfaceIVSComponent- Parameters:
path- The path to the group in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The group, never null.
- Throws:
NotFoundException- If the action is not found.
getGroupNull
Gets the group with the specified path.It is preferable to use
getGroup(String)instead of this method if the group always should be present because it will throw and log errors.- Specified by:
getGroupNullin interfaceIVSComponent- Parameters:
path- The path to the group in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The group, null if not found.
getGroup2
Gets the group with the specified full VS reference path.- Specified by:
getGroup2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the group in the VirtualSpace, as "module:/vs/path".- Returns:
- The group, never null.
- Throws:
NotFoundException- If the group is not found.
getGroupNull2
Gets the group with the specified full VS reference path.It is preferable to use
getGroup2(String)instead of this method if the group always should be present because it will throw and log errors.- Specified by:
getGroupNull2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the group the VirtualSpace, as "module:/vs/path".- Returns:
- The group, null if not found.
getVSComponent
public <COMP extends IVSComponent> COMP getVSComponent(@VSRef String path, Class<COMP> clazz) throws NotFoundException Gets the VS component with the specified path.- Specified by:
getVSComponentin interfaceIVSComponent- Parameters:
path- The path to the VS component in the VirtualSpace, cannot start with '/' or contain ':'.clazz- The requested VS component class.- Returns:
- The component, never null or wrong class.
- Throws:
NotFoundException- If the component is not found or wrong class.
getVSComponentNull
Gets the VS component with the specified path.- Specified by:
getVSComponentNullin interfaceIVSComponent- Parameters:
path- The path to the VS component in the VirtualSpace, cannot start with '/' or contain ':'.clazz- The requested VS component class.- Returns:
- The component, null if not found or wrong class.
getVSComponent2
public <COMP extends IVSComponent> COMP getVSComponent2(@FullVSRef String fullVSRef, Class<COMP> clazz) throws NotFoundException Gets the VS component with the specified full reference path.- Specified by:
getVSComponent2in interfaceIVSComponent- Parameters:
fullVSRef- The full reference path to the VS component in the VirtualSpace, as "module:/vs/path".clazz- The requested VS component class.- Returns:
- The component, never null or wrong class.
- Throws:
NotFoundException- If the component is not found or wrong class.
getVSComponentNull2
public <COMP extends IVSComponent> COMP getVSComponentNull2(@FullVSRef String fullVSRef, Class<COMP> clazz) Gets the VS component with the specified full reference path.- Specified by:
getVSComponentNull2in interfaceIVSComponent- Parameters:
fullVSRef- The full reference path to the VS component in the VirtualSpace, as "module:/vs/path".clazz- The requested VS component class.- Returns:
- The component, null if not found or wrong class.
getPrivateStorageMap
Gets the concurrent hash map used to store the private data.- Specified by:
getPrivateStorageMapin interfaceIPrivateStorage- Returns:
- The private storage map.