Package org.cristalise.kernel.collection
Class DependencyDescription
java.lang.Object
org.cristalise.kernel.collection.Collection<DependencyMember>
org.cristalise.kernel.collection.Dependency
org.cristalise.kernel.collection.DependencyDescription
- All Implemented Interfaces:
CollectionDescription<DependencyMember>,C2KLocalObject
public class DependencyDescription
extends Dependency
implements CollectionDescription<DependencyMember>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cristalise.kernel.collection.Collection
Collection.Cardinality, Collection.Type -
Field Summary
Fields inherited from class org.cristalise.kernel.collection.Dependency
mClassProps, mPropertiesFields inherited from class org.cristalise.kernel.collection.Collection
mMembers, mName, mVersion -
Constructor Summary
ConstructorsConstructorDescriptionDependencyDescription(String name) DependencyDescription(String name, Integer version) -
Method Summary
Modifier and TypeMethodDescriptionaddMember(ItemPath itemPath, TransactionKey transactionKey) Add a member to the DependencyaddMember(ItemPath itemPath, CastorHashMap props, String classProps, TransactionKey transactionKey) Add a member to this collection, with the given property and class properties and optionally an Item to assign, which may be null if the collection allows empty slots.voidnewInstance(TransactionKey transactionKey) Create a new instance of this collection.Methods inherited from class org.cristalise.kernel.collection.Dependency
addMember, addToItemProperties, addToVertexProperties, compare, containsBuiltInProperty, createMember, createMember, evaluateScript, getBuiltInProperty, getBuiltInProperty, getCardinality, getClassProperties, getClassProps, getKeyValuePairs, getProperties, getToDependencyName, getType, setClassProps, setKeyValuePairs, setProperties, toString, updateMember, updateMemberMethods inherited from class org.cristalise.kernel.collection.Collection
contains, equals, getClusterPath, getClusterType, getCounter, getDescVer, getMember, getMember, getMembers, getName, getVersion, getVersionName, hashCode, isFull, removeMember, removeMember, resolveMembers, resolveMembers, resolveMembers, setMembers, setName, setVersion, sizeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cristalise.kernel.entity.C2KLocalObject
getClusterPath, getClusterType, getName, setName
-
Constructor Details
-
DependencyDescription
public DependencyDescription() -
DependencyDescription
-
DependencyDescription
-
-
Method Details
-
newInstance
public Collection<DependencyMember> newInstance(TransactionKey transactionKey) throws ObjectNotFoundException Description copied from interface:CollectionDescriptionCreate a new instance of this collection.- Specified by:
newInstancein interfaceCollectionDescription<DependencyMember>- Parameters:
transactionKey- the key of the current transaction- Returns:
- a new collection instance
- Throws:
ObjectNotFoundException- When an essential piece of description data, such as a child Item PropertyDescription outcome, doesn't exist.
-
addMember
public DependencyMember addMember(ItemPath itemPath, TransactionKey transactionKey) throws InvalidCollectionModification, ObjectAlreadyExistsException Description copied from class:DependencyAdd a member to the Dependency- Overrides:
addMemberin classDependency- Parameters:
itemPath- the Item to be added as a Member- Returns:
- DependencyMember the newly created DependencyMember
- Throws:
InvalidCollectionModification- if Item is null or the Properties of the Item (e.g. Type) does not match the Collection'sObjectAlreadyExistsException- Item is already a member
-
addMember
public DependencyMember addMember(ItemPath itemPath, CastorHashMap props, String classProps, TransactionKey transactionKey) throws InvalidCollectionModification, ObjectAlreadyExistsException Description copied from class:CollectionAdd a member to this collection, with the given property and class properties and optionally an Item to assign, which may be null if the collection allows empty slots.- Overrides:
addMemberin classDependency- Parameters:
itemPath- the Item to assign to the new slot. Optional for collections that allow empty slotsprops- the Properties of the new memberclassProps- the names of the properties that dictate the type of assigned Items.- Returns:
- the new CollectionMember instance
- Throws:
InvalidCollectionModification- when the assignment was invalid because of collection constraints, such as global type constraints, or not allowing empty slots.ObjectAlreadyExistsException- some collections don't allow multiple slots assigned to the same Item, and throw this Exception if it is attempted
-
checkMembership
- Throws:
InvalidCollectionModification
-