public abstract class SimpleNodeConfig extends Object implements org.azyva.dragom.model.config.NodeConfig, org.azyva.dragom.model.config.MutableNodeConfig
NodeConfig and MutableNodeConfig.org.azyva.dragom.model.config.impl.simple| Modifier and Type | Field and Description |
|---|---|
protected boolean |
indNew
Indicates that the
SimpleNodeConfig is new and has not been finalized
yet. |
protected int |
revision
Unique revision number to manage optimistic locking (see
OptimisticLockHandle). |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkOptimisticLock(org.azyva.dragom.model.config.OptimisticLockHandle optimisticLockHandle,
boolean indRequireLock)
Check whether the
OptimisticLockHandle corresponds to the current state
of the data it represents. |
org.azyva.dragom.model.config.OptimisticLockHandle |
createOptimisticLockHandle(boolean indLock) |
void |
delete() |
protected void |
extractNodeConfigTransferObject(org.azyva.dragom.model.config.NodeConfigTransferObject nodeConfigTransferObject,
org.azyva.dragom.model.config.OptimisticLockHandle optimisticLockHandle)
Called by subclasses to extract the data from a
NodeConfigTransferObject and set
them within the SimpleNodeConfig. |
List<org.azyva.dragom.model.config.PluginDefConfig> |
getListPluginDefConfig() |
List<org.azyva.dragom.model.config.PropertyDefConfig> |
getListPropertyDefConfig() |
String |
getName() |
org.azyva.dragom.model.config.NodeConfigTransferObject |
getNodeConfigTransferObject(org.azyva.dragom.model.config.OptimisticLockHandle optimisticLockHandle) |
org.azyva.dragom.model.config.PluginDefConfig |
getPluginDefConfig(Class<? extends org.azyva.dragom.model.plugin.NodePlugin> classNodePlugin,
String pluginId) |
org.azyva.dragom.model.config.PropertyDefConfig |
getPropertyDefConfig(String name) |
boolean |
isNew() |
boolean |
isOptimisticLockValid(org.azyva.dragom.model.config.OptimisticLockHandle optimisticLockHandle) |
boolean |
isPluginDefConfigExists(Class<? extends org.azyva.dragom.model.plugin.NodePlugin> classNodePlugin,
String pluginId) |
boolean |
isPropertyExists(String name) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected boolean indNew
SimpleNodeConfig is new and has not been finalized
yet. This is the state in which it is after having been created using the
create methods of SimpleConfig or
SimpleClassificationNodeConfig.protected int revision
OptimisticLockHandle).
Starts at since 0 within OptimisticLockHandle means not locked.
public String getName()
getName in interface org.azyva.dragom.model.config.NodeConfigpublic org.azyva.dragom.model.config.PropertyDefConfig getPropertyDefConfig(String name)
getPropertyDefConfig in interface org.azyva.dragom.model.config.NodeConfigpublic boolean isPropertyExists(String name)
isPropertyExists in interface org.azyva.dragom.model.config.NodeConfigpublic List<org.azyva.dragom.model.config.PropertyDefConfig> getListPropertyDefConfig()
getListPropertyDefConfig in interface org.azyva.dragom.model.config.NodeConfigpublic org.azyva.dragom.model.config.PluginDefConfig getPluginDefConfig(Class<? extends org.azyva.dragom.model.plugin.NodePlugin> classNodePlugin, String pluginId)
getPluginDefConfig in interface org.azyva.dragom.model.config.NodeConfigpublic boolean isPluginDefConfigExists(Class<? extends org.azyva.dragom.model.plugin.NodePlugin> classNodePlugin, String pluginId)
isPluginDefConfigExists in interface org.azyva.dragom.model.config.NodeConfigpublic List<org.azyva.dragom.model.config.PluginDefConfig> getListPluginDefConfig()
getListPluginDefConfig in interface org.azyva.dragom.model.config.NodeConfigpublic boolean isNew()
isNew in interface org.azyva.dragom.model.config.MutableNodeConfigprotected void checkOptimisticLock(org.azyva.dragom.model.config.OptimisticLockHandle optimisticLockHandle,
boolean indRequireLock)
OptimisticLockHandle corresponds to the current state
of the data it represents.
If optimisticLockHandle is null, nothing is done.
If optimisticLockHandle is not null and is locked
(OptimisticLockHandle.isLocked()), its state must correspond to the state
of the data it represents, otherwise OptimisticLockException is thrown.
If optimisticLockHandle is not null and is not locked, it is simply locked to the current state of the data, unless indRequireLock, in which case an exception is thrown.
optimisticLockHandle - OptimisticLockHandle. Can be null.indRequireLock - Indicates if it is required that the OptimisticLockHandle
be locked.public org.azyva.dragom.model.config.OptimisticLockHandle createOptimisticLockHandle(boolean indLock)
createOptimisticLockHandle in interface org.azyva.dragom.model.config.MutableNodeConfigpublic boolean isOptimisticLockValid(org.azyva.dragom.model.config.OptimisticLockHandle optimisticLockHandle)
isOptimisticLockValid in interface org.azyva.dragom.model.config.MutableNodeConfigpublic org.azyva.dragom.model.config.NodeConfigTransferObject getNodeConfigTransferObject(org.azyva.dragom.model.config.OptimisticLockHandle optimisticLockHandle)
throws org.azyva.dragom.model.config.OptimisticLockException
getNodeConfigTransferObject in interface org.azyva.dragom.model.config.MutableNodeConfigorg.azyva.dragom.model.config.OptimisticLockExceptionprotected void extractNodeConfigTransferObject(org.azyva.dragom.model.config.NodeConfigTransferObject nodeConfigTransferObject,
org.azyva.dragom.model.config.OptimisticLockHandle optimisticLockHandle)
throws org.azyva.dragom.model.config.DuplicateNodeException
NodeConfigTransferObject and set
them within the SimpleNodeConfig.
Uses the indNew variable, but does not reset it. It is intended to be reset by
the subclass caller method, MutableNodeConfig.setNodeConfigTransferObject(org.azyva.dragom.model.config.NodeConfigTransferObject, org.azyva.dragom.model.config.OptimisticLockHandle).
The reason for not directly implementing MutableNodeConfig.setNodeConfigValueTransferObject is that subclasses can have other tasks to perform.
If optimisticLockHandle is null, no optimistic lock is managed.
If optimisticLockHandle is not null, it must be locked
(OptimisticLockHandle.isLocked()) and its state must correspond to the
state of the data it represents, otherwise OptimisticLockException is
thrown. The state of the OptimisticLockHandle is updated to the new revision of
the SimpleNodeConfig.
nodeConfigTransferObject - NodeConfigTransferObject.optimisticLockHandle - OptimisticLockHandle. Can be null.org.azyva.dragom.model.config.OptimisticLockException - Can be thrown only if optimisticLockHandle is
not null. This is a RuntimeException that may be of interest to
the caller.org.azyva.dragom.model.config.DuplicateNodeException - When the new configuration data would introduce
a duplicate MutableNode within the parent. This is a RuntimeException
that may be of interest to the caller.public void delete()
delete in interface org.azyva.dragom.model.config.MutableNodeConfigCopyright © 2015–2016 AZYVA INC.. All rights reserved.