Package org.alfresco.repo.importer.view
Class NodeContext
java.lang.Object
org.alfresco.repo.importer.view.ElementContext
org.alfresco.repo.importer.view.NodeContext
- All Implemented Interfaces:
ImportNode
Maintains state about the currently imported node.
- Author:
- David Caruana
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionNodeContext(QName elementName, ParentContext parentContext, TypeDefinition typeDef) Construct -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAccessControlEntry(AccessStatus accessStatus, String authority, String permission) Adds an Access Control EntryvoidaddAspect(AspectDefinition aspect) Adds an aspect to the nodevoidaddDatatype(QName property, DataTypeDefinition datatype) Adds a property datatype to the nodevoidaddProperty(QName property, Serializable value) Adds a property to the nodevoidaddPropertyCollection(QName property) Adds a collection property to the nodedetermineAspect(QName defName) Determine if name referes to an aspectdetermineAssociation(QName defName) Determine if name referes to an associationdetermineDefinition(QName defName) Determine the type of definition (aspect, property, association) from the specified namedetermineProperty(QName defName) Determine if name refers to a propertyGets the Access Control EntriesbooleanGets all properties for the nodegetPropertyDataType(QName propertyName) Gets the property data typegetUUID()booleanvoidsetChildName(String childName) voidsetImportId(String importId) voidsetInheritPermissions(boolean inherit) voidsetNodeRef(NodeRef nodeRef) voidsetReference(boolean isReference) voidsetTypeDefinition(TypeDefinition typeDef) Set Type DefinitionvoidtoString()Methods inherited from class org.alfresco.repo.importer.view.ElementContext
getDictionaryService, getElementName, getImporter
-
Constructor Details
-
NodeContext
Construct- Parameters:
elementName- QNameparentContext- ParentContexttypeDef- TypeDefinition
-
-
Method Details
-
getParentContext
- Specified by:
getParentContextin interfaceImportNode- Returns:
- the parent context
-
getTypeDefinition
- Specified by:
getTypeDefinitionin interfaceImportNode- Returns:
- the type definition
-
isReference
public boolean isReference()- Specified by:
isReferencein interfaceImportNode- Returns:
- is this a node reference
-
setReference
public void setReference(boolean isReference) - Parameters:
isReference- true => this is a node reference
-
setTypeDefinition
Set Type Definition- Parameters:
typeDef- TypeDefinition
-
getNodeRef
- Specified by:
getNodeRefin interfaceImportNode- Returns:
- the node ref
-
setNodeRef
- Parameters:
nodeRef- the node ref
-
getUUID
- Specified by:
getUUIDin interfaceImportNode- Returns:
- node uuid to create node with
-
setUUID
- Parameters:
uuid- uuid
-
getImportId
-
setImportId
- Parameters:
importId- import scoped id
-
getChildName
- Specified by:
getChildNamein interfaceImportNode- Returns:
- the child name
-
setChildName
- Parameters:
childName- the child name
-
setInheritPermissions
public void setInheritPermissions(boolean inherit) -
getInheritPermissions
public boolean getInheritPermissions()- Specified by:
getInheritPermissionsin interfaceImportNode- Returns:
- true => node inherits permissions from parent
-
addPropertyCollection
Adds a collection property to the node- Parameters:
property- QName
-
addProperty
Adds a property to the node- Parameters:
property- the property namevalue- the property value
-
addDatatype
Adds a property datatype to the node- Parameters:
property- property namedatatype- property datatype
-
getPropertyDatatypes
-
getProperties
Description copied from interface:ImportNodeGets all properties for the node- Specified by:
getPropertiesin interfaceImportNode- Returns:
- the properties
-
getPropertyDataType
Description copied from interface:ImportNodeGets the property data type- Specified by:
getPropertyDataTypein interfaceImportNode- Parameters:
propertyName- name of property- Returns:
- data type of named property
-
addAspect
Adds an aspect to the node- Parameters:
aspect- the aspect
-
getNodeAspects
- Specified by:
getNodeAspectsin interfaceImportNode- Returns:
- the aspects of this node
-
addAccessControlEntry
Adds an Access Control Entry- Parameters:
accessStatus- AccessStatusauthority- Stringpermission- String
-
getAccessControlEntries
Gets the Access Control Entries- Specified by:
getAccessControlEntriesin interfaceImportNode- Returns:
- access control entries
-
determineDefinition
Determine the type of definition (aspect, property, association) from the specified name- Parameters:
defName- QName- Returns:
- the dictionary definition
-
determineAspect
Determine if name referes to an aspect- Parameters:
defName- QName- Returns:
- AspectDefinition
-
determineProperty
Determine if name refers to a property- Parameters:
defName- QName- Returns:
- PropertyDefinition
-
determineAssociation
Determine if name referes to an association- Parameters:
defName- QName- Returns:
- AssociationDefinition
-
toString
-