Class VSReference
- All Implemented Interfaces:
EventListener
,IGProp<ReferenceString>
,IPropReference
,IReferencingGProp
,Cloneable
- Direct Known Subclasses:
VSParticipant
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.prop.IPropReference
IPropReference.IRefType, IPropReference.ReferenceChangeEvent, IPropReference.RefType
Field Summary
Fields inherited from class com.iizix.prop.AbstractReference
ERROR_ID, hasBeenValidated, QUICK_FIX_DELETE_PROP, reference
Fields 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_2
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
ConstructorDescriptionCreates a VirtualSpace Reference property with no name and with a null value.VSReference
(Atom propertyAtom) Creates a VirtualSpace Reference property with the specified name with a null value.VSReference
(Atom propertyAtom, String newValue) Creates a VirtualSpace Reference property with the specified name and value.Method Summary
Modifier and TypeMethodDescriptionprotected void
Called to clear the fixed reference in case the reference is changed.protected VirtualSpace
Support for a fixed reference.Gets the non-virtualized VirtualSpace instance.Gets the class wanted.Gets the reference Type.Gets the VirtualSpace for this reference.getVSComponent
(VSRelativeReference<?> relRef) Gets a VirtualSpace component from a relative reference.getVSComponent
(String rel) Gets a VirtualSpace component from a relative reference.protected final boolean
Called upon creation of the property to check it's private state.boolean
isReferenceValid
(GProp<?> property) Validates the property reference that has been looked up.void
onReferenceEvent
(PropReference ref, IPropReference.ReferenceChangeEvent event, GEvent triggerEvent) Called when a property reference event occurs.protected String
Returns the parameter string representing the state of this event.protected VSReference
virtualize
(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace) Call this method to "virtualize" a property tree.Methods inherited from class com.iizix.prop.AbstractReference
appendPropValue, assignError, assignNotFoundError, changeReference, checkCreateReference, clearError, clone, createUpdateReference, disposeReference, doPostResolve, equalsErrors, equalValues, getAbsoluteReference, getDirectReferencedTarget, getDirectReferencedTargetSet, getLookupPropReference, getPropValue0, getReference, getReferenceString, getTargetReference, getTargetReference, getValueClasses, informClearError, informError, informResolved, initializeValue, isReferencingMultipleTargets, isValid, modifyPropValue, onEventSelf, onProjectNameChanged, onPropDispose, onPropParentChanged, onRefactored, onReferenceDisposed, onReferenceEvent, setLookedUpReference, setPropValue, toNativeValue0, updateReference, validatePropType, validatePropValue, validateReferenceScope, wouldValidate
Methods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, appendProp, convertPropError, dispose, equals, equals, equalsObj, equalsPropValue, equalsTree, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropBaseReference, 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, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeElement, initializeGElement, initializeGProp, initializeProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, isSibling, list, list, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onPrepare, onPropInvalidateCache, onPropTreeInitialized, onPropValueSet, onRemoteEvent, onVirtualizationCompleted, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setCreateRequiredProp, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toElementString, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, verify, warning, warning, warning
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.prop.IReferencingGProp
getParent, getReferencingOwner
Constructor Details
VSReference
public VSReference()Creates a VirtualSpace Reference property with no name and with a null value.VSReference
Creates a VirtualSpace Reference property with the specified name with a null value.- Parameters:
propertyAtom
- the property atom.
VSReference
Creates a VirtualSpace Reference property with the specified name and value.- Parameters:
propertyAtom
- the property atom.newValue
- the new string value for the property.
Method Details
isPropPrivateAtCreation
protected final 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.- Overrides:
isPropPrivateAtCreation
in classGProp<ReferenceString>
- Returns:
- true, always.
virtualize
protected VSReference 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.
- Overrides:
virtualize
in classGProp<ReferenceString>
- 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 or if in
getFixedTarget
Support for a fixed reference.Override to provide the support.
- Overrides:
getFixedTarget
in classAbstractReference<VirtualSpace>
- Returns:
- The fixed reference to return in cases the target reference is needed, and also serves as a verification if a new reference should be created or not. Returning
null
causes normal behavior (default).
clearFixedTarget
protected void clearFixedTarget()Called to clear the fixed reference in case the reference is changed. This will revert back to normal processing.The "clone" method does not change to be overridden to clear the fixed target as this method is called during cloning.
Override to provide the support. It is important to also implement this method along with "getFixedTarget".
- Overrides:
clearFixedTarget
in classAbstractReference<VirtualSpace>
onReferenceEvent
public void onReferenceEvent(PropReference ref, IPropReference.ReferenceChangeEvent event, GEvent triggerEvent) Called when a property reference event occurs. The events are ReferenceChangeEvent.FOUND, FOUND_WRONG_CLASS, RENAMED, MOVED, NEW_PROPERTY, BROKEN.- Specified by:
onReferenceEvent
in interfaceIPropReference
- Overrides:
onReferenceEvent
in classAbstractReference<VirtualSpace>
- Parameters:
ref
- The property reference object.event
- The event.triggerEvent
- The event that triggered this reference event, null for none.
getReferenceType
Gets the reference Type.- Specified by:
getReferenceType
in interfaceIPropReference
- Specified by:
getReferenceType
in interfaceIReferencingGProp
- Specified by:
getReferenceType
in classAbstractReference<VirtualSpace>
- Returns:
IPropReference.RefType.VirtualSpace
.
getPropertyClass
Gets the class wanted.- Specified by:
getPropertyClass
in classAbstractReference<VirtualSpace>
- Returns:
- VirtualSpace.class.
isReferenceValid
Validates the property reference that has been looked up.- Specified by:
isReferenceValid
in interfaceIPropReference
- Specified by:
isReferenceValid
in classAbstractReference<VirtualSpace>
- Parameters:
property
- The property to validate.- Returns:
- true if valid, false otherwise.
getVSComponent
Gets a VirtualSpace component from a relative reference.- Parameters:
relRef
- The relative reference.- Returns:
- A property container of VSField, VSTable, VSColumnHeader, VSRow instance, or null if not found.
getVSComponent
Gets a VirtualSpace component from a relative reference.- Parameters:
rel
- The relative reference.- Returns:
- A property container of VSField, VSTable, VSColumnHeader, VSRow instance, or null if not found.
getVirtualSpace
Gets the VirtualSpace for this reference.The method first attempts to use the resolved mechanism of getting the VirtualSpace. If this has failed or has not been resolved yet, the property tree will be used to search for it. The latter is, of course, slower.
- Returns:
- The
VirtualSpace
instance, ornull
if not found.
getNonVirtualizedVirtualSpace
Gets the non-virtualized VirtualSpace instance.- Returns:
- The non-virtualized VirtualSpace instance if reference is found.
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.- Overrides:
paramString
in classAbstractReference<VirtualSpace>
- Returns:
- the parameter string of this event.