public class AlfrescoEmbExtendedContentImpl extends java.lang.Object implements IExtendedContent
Modifier and Type | Field and Description |
---|---|
protected org.alfresco.service.namespace.QName |
renditionQName
The QName to use when looking for the rendition property on a node.
|
Modifier | Constructor and Description |
---|---|
protected |
AlfrescoEmbExtendedContentImpl() |
Modifier and Type | Method and Description |
---|---|
ExtendedContentResult |
addRendition(java.lang.String ticket,
java.lang.String objectId,
EnhancedObjectContent rendition)
Adds a rendition to a document.
|
void |
changeType(java.lang.String ticket,
java.lang.String objectId,
java.lang.String newType)
Changes the type of an object
NOTE: May not be able to change type as will.
|
java.lang.String |
copyObject(java.lang.String ticket,
java.lang.String objectId,
java.lang.String destFolderPath)
Copy a given object with specified ID to a specified folder path.
|
java.lang.String |
findCurrentVersionId(java.lang.String ticket,
java.lang.String objectId)
Given a chronId, find the CURRENT version of the object and return its objectId
|
java.lang.String |
findFirstVersionId(java.lang.String ticket,
java.lang.String objectId)
Given an objectId, find the first version of the object
|
java.lang.String |
findLatestVersionId(java.lang.String ticket,
java.lang.String objectId)
Given a chronId, find the LATEST version of the object and return its objectId
|
java.lang.String |
getAcl(java.lang.String ticket,
java.lang.String objectId)
Return the object ID of the ACL for a given document ID.
|
java.lang.String |
getAclName(java.lang.String ticket,
java.lang.String objectId)
Return the name of the ACL for a given document ID.
|
ExtendedContentResult |
getAllSubtypes(java.lang.String ticket,
java.lang.String parentTypeName)
Returns the object type and all of its subtypes within the repository.
|
ExtendedContentResult |
getAllVersions(java.lang.String ticket,
java.lang.String objectId)
Returns all versions of an object
|
java.util.List<org.alfresco.service.cmr.repository.AssociationRef> |
getAssociatedChildren(org.alfresco.service.ServiceRegistry serviceRegistry,
org.alfresco.service.cmr.repository.NodeRef workstoreRef,
org.alfresco.service.namespace.QName qname)
Get all associated children with a given nodeRef
|
java.util.Map<java.lang.String,java.lang.String> |
getAvailableThumbnails(java.lang.String ticket,
java.lang.String objectId,
java.lang.String def)
Get All Available Thumbnails for a Node if def is not provided
Checks for existence of thumbnail definition "def" if provided
Should return a List
|
ExtendedContentResult |
getChildByName(java.lang.String ticket,
java.lang.String parentId,
java.lang.String childName)
Returns the child(ren) by the given name of the parent ID.
|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
getChildFolders(java.lang.String ticket,
java.lang.String id)
Returns all children folders contained in the given object, only returns direct children.
|
ExtendedContentResult |
getChildren(java.lang.String ticket,
java.lang.String objectId)
ALFRESCO NOTE: if you call getChildren for an object that has a working copy, the children that will be returned are the children that exist on the Working Copy AND the locked node.
|
java.util.List<OpenContentObject> |
getChildren(java.lang.String ticket,
java.lang.String objectId,
java.lang.String[] mimetypeFilters)
ALFRESCO NOTE: if you call getChildren for an object that has a working copy, the children that will be returned are the children that exist on the Working Copy AND the locked node.
|
java.util.List<OpenContentObject> |
getChildren(java.lang.String ticket,
java.lang.String objectId,
java.lang.String[] mimetypeFilters,
java.lang.Boolean includeRenditionable)
ALFRESCO NOTE: if you call getChildren for an object that has a working copy, the children that will be returned are the children that exist on the Working Copy AND the locked node.
|
java.lang.String |
getChildVersion(org.alfresco.service.ServiceRegistry serviceRegistry,
org.alfresco.service.cmr.repository.AssociationRef associationRef)
Gets the version of the child reference
|
ObjectContentInfo |
getContentInfo(java.lang.String ticket,
java.lang.String objectId)
Returns the
ObjectContentInfo object for the given object. |
java.lang.String |
getContentPath(java.lang.String id,
java.lang.String fileExtension)
Returns the full filepath of the document's content.
|
ExtendedContentResult |
getObjectPath(java.lang.String ticket,
java.lang.String objectId)
Returns the path to given objectId
|
ExtendedContentResult |
getParents(java.lang.String ticket,
java.lang.String objectId)
ALFRESCO NOTE: if you call getParents for an object that has a working copy, the parents that will be returned are the parents that exist on the Working Copy AND the locked node.
|
ExtendedContentResult |
getRelatedChildren(java.lang.String ticket,
java.lang.String objectId,
java.lang.String relationName)
ALFRESCO NOTE: if you call getRelatedChildren for an object that has a working copy, the children that will be returned are the children that exist on the Working Copy AND the locked object.
|
ExtendedContentResult |
getRelatedParents(java.lang.String ticket,
java.lang.String objectId,
java.lang.String relationName)
ALFRESCO NOTE: if you call getRelatedParents for an object that has a working copy, the parents that will be returned are the parents that exist on the Working Copy AND the locked object.
|
EnhancedObjectContent |
getThumbnail(java.lang.String ticket,
java.lang.String objectId,
java.lang.String thumbnailName)
Get a thumbnail of a given object that is represented by a thumbnail name (e.g.
|
EnhancedObjectContent |
getThumbnailContent(java.lang.String ticket,
java.lang.String objectId,
java.lang.String thumbnailName) |
java.lang.String |
getUUID(java.lang.String ticket,
java.lang.String objectId)
Given an object id, return the unique identifier for that object.
|
org.alfresco.service.cmr.version.Version |
getWorkspaceVersion(org.alfresco.service.ServiceRegistry serviceRegistry,
org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets the version of a given nodeRef that corresponds to its workspace store node
|
boolean |
hasRelations(java.lang.String ticket,
java.lang.String objectId,
java.lang.String relationName,
boolean parent)
Returns true if an object with objectId has either a parent or child
relationship of relationName.
|
boolean |
isContainer(java.lang.String ticket,
java.lang.String objectId)
Return whether or not the object related to the ticket is a container or
not
|
java.lang.String |
legacyFindCurrentVersionId(java.lang.String ticket,
java.lang.String objectId)
Deprecated.
|
java.lang.String |
legacyFindFirstVersion(java.lang.String ticket,
java.lang.String objectId)
Deprecated.
|
protected java.lang.Boolean |
matchesMimetypeFilters(org.alfresco.service.ServiceRegistry serviceRegistry,
org.alfresco.service.cmr.repository.NodeRef child,
java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> props,
java.lang.String[] mimetypeFilters,
java.lang.Boolean includeRenditionable)
Checks if a NodeRef matches a list of acceptable mimetypes.
|
ExtendedContentResult |
removeRendition(java.lang.String ticket,
java.lang.String objectId,
java.lang.String mimeType)
Deprecated.
|
java.lang.String |
resolveVersion(java.lang.String ticket,
java.lang.String objectId,
java.lang.String label)
Given an objectId (not necessarily the version we are looking for) find the version of the document that is labeled with the label
that is passed in.
|
boolean |
setAcl(java.lang.String ticket,
java.lang.String aclId,
java.lang.String objectId)
Set the ACL for a given document.
|
void |
setContentStoreLocation(java.lang.String val) |
void |
setRenditionQName(java.lang.String renditionQName)
Used to set the QName to use when looking for the rendition property on a node.
|
protected org.alfresco.service.namespace.QName renditionQName
public void setContentStoreLocation(java.lang.String val)
public void setRenditionQName(java.lang.String renditionQName)
renditionQName
- the string representation of the QName to use for the rendition property for a node.public boolean isContainer(java.lang.String ticket, java.lang.String objectId)
IExtendedContent
isContainer
in interface IExtendedContent
ticket
- an authentication ticketobjectId
- the object ID of a document you wish to get the ACL forpublic ExtendedContentResult addRendition(java.lang.String ticket, java.lang.String objectId, EnhancedObjectContent rendition)
IExtendedContent
addRendition
in interface IExtendedContent
rendition
- the content and the mimetype of the renditionExtendedContentResult
public java.lang.String copyObject(java.lang.String ticket, java.lang.String objectId, java.lang.String destFolderPath)
IExtendedContent
copyObject
in interface IExtendedContent
ticket
- an authentication ticketobjectId
- the object ID to create a copy ofdestFolderPath
- location to copy the object toIExtendedContent.copyObject(java.lang.String, java.lang.String, java.lang.String)
public java.lang.String getAcl(java.lang.String ticket, java.lang.String objectId)
IExtendedContent
getAcl
in interface IExtendedContent
ticket
- an authentication ticketobjectId
- the object ID of a document you wish to get the ACL forIExtendedContent.getAcl(java.lang.String, java.lang.String)
public java.lang.String getAclName(java.lang.String ticket, java.lang.String objectId)
IExtendedContent
getAclName
in interface IExtendedContent
ticket
- an authentication ticketobjectId
- the object ID of a document you wish to get the ACL forIExtendedContent.getAclName(java.lang.String, java.lang.String)
public ExtendedContentResult getAllSubtypes(java.lang.String ticket, java.lang.String parentTypeName)
IExtendedContent
getAllSubtypes
in interface IExtendedContent
ticket
- Authentication ticketparentTypeName
- name of the parent typeExtendedContentResult
objects
- one object for object typeobjectType
- repo specific object typeIExtendedContent.getAllSubtypes(java.lang.String, java.lang.String)
public ExtendedContentResult getAllVersions(java.lang.String ticket, java.lang.String objectId)
IExtendedContent
getAllVersions
in interface IExtendedContent
ExtendedContentResult.objects
[0] is current version
ExtendedContentResult
objects
- one object for each versionobjectType
- repo specific object typeprops
- metadata for objectIExtendedContent.getAllVersions(java.lang.String, java.lang.String)
public ExtendedContentResult getChildren(java.lang.String ticket, java.lang.String objectId)
getChildren
in interface IExtendedContent
ExtendedContentResult
objects
- one object for each childobjectType
- repo specific object typeprops
- metadata for objectIExtendedContent.getChildren(java.lang.String, java.lang.String)
protected java.lang.Boolean matchesMimetypeFilters(org.alfresco.service.ServiceRegistry serviceRegistry, org.alfresco.service.cmr.repository.NodeRef child, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> props, java.lang.String[] mimetypeFilters, java.lang.Boolean includeRenditionable)
serviceRegistry
- child
- props
- mimetypeFilters
- includeRenditionable
- public java.util.List<OpenContentObject> getChildren(java.lang.String ticket, java.lang.String objectId, java.lang.String[] mimetypeFilters)
getChildren
in interface IExtendedContent
ExtendedContentResult
objects
- one object for each childobjectType
- repo specific object typeprops
- metadata for objectIExtendedContent.getChildren(java.lang.String, java.lang.String)
public java.util.List<OpenContentObject> getChildren(java.lang.String ticket, java.lang.String objectId, java.lang.String[] mimetypeFilters, java.lang.Boolean includeRenditionable)
getChildren
in interface IExtendedContent
includeRenditionable
- optional parameter to allow documents which don't but can match filtersExtendedContentResult
objects
- one object for each childobjectType
- repo specific object typeprops
- metadata for objectIExtendedContent.getChildren(java.lang.String, java.lang.String)
public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getChildFolders(java.lang.String ticket, java.lang.String id)
IExtendedContent
getChildFolders
in interface IExtendedContent
IExtendedContent.getChildFolders(java.lang.String, java.lang.String)
public ObjectContentInfo getContentInfo(java.lang.String ticket, java.lang.String objectId)
IExtendedContent
ObjectContentInfo
object for the given object. NOTE: This method will not return any content, only info on the formats.
Thumbnail content will NOT be returned.
Only content formats that are known in the mimeType-extension map will be returned.
If the object has more than one format, index 0 on the lists on the ObjectContentInfo
will be the native content property,
while the 2nd-N items will contain renditions.getContentInfo
in interface IExtendedContent
ticket
- Authentication ticketobjectId
- Object Id of the object whose content info is to be retrievedObjectContentInfo
object with info on the known formats of the objectIExtendedContent.getContentInfo(java.lang.String, java.lang.String)
public ExtendedContentResult getObjectPath(java.lang.String ticket, java.lang.String objectId)
IExtendedContent
getObjectPath
in interface IExtendedContent
ticket
- - session ticketobjectId
- - objectId of a document or folder. (DCTM implementation doesn't support documents and will throw an error)ExtendedContentResult
stringResult
- repository folder path to the given objectIExtendedContent.getObjectPath(java.lang.String, java.lang.String)
public ExtendedContentResult getParents(java.lang.String ticket, java.lang.String objectId)
getParents
in interface IExtendedContent
ExtendedContentResult
objects
- one object for each parentobjectType
- repo specific object typeprops
- metadata for objectIExtendedContent.getParents(java.lang.String, java.lang.String)
public ExtendedContentResult getRelatedChildren(java.lang.String ticket, java.lang.String objectId, java.lang.String relationName)
getRelatedChildren
in interface IExtendedContent
ExtendedContentResult
objects
- one object for each child (NOTE: the content of each child should NOT be populated)objectType
- repo specific object typeprops
- metadata for objectIExtendedContent.getRelatedChildren(java.lang.String, java.lang.String, java.lang.String)
public ExtendedContentResult getRelatedParents(java.lang.String ticket, java.lang.String objectId, java.lang.String relationName)
getRelatedParents
in interface IExtendedContent
ExtendedContentResult
objects
- one object for each parentobjectType
- repo specific object typeprops
- metadata for objectIExtendedContent.getRelatedParents(java.lang.String, java.lang.String, java.lang.String)
@Deprecated public ExtendedContentResult removeRendition(java.lang.String ticket, java.lang.String objectId, java.lang.String mimeType)
IRendition
removeRendition
in interface IExtendedContent
ExtendedContentResult
stringResult
- mimeType of the rendition that was sucessfully removedIExtendedContent.removeRendition(java.lang.String, java.lang.String, java.lang.String)
public boolean setAcl(java.lang.String ticket, java.lang.String aclId, java.lang.String objectId)
IExtendedContent
setAcl
in interface IExtendedContent
ticket
- an authentication ticketaclId
- the object ID of the ACL to apply to the documentobjectId
- the object ID of the document to apply the ACL toIExtendedContent.setAcl(java.lang.String, java.lang.String, java.lang.String)
public java.util.Map<java.lang.String,java.lang.String> getAvailableThumbnails(java.lang.String ticket, java.lang.String objectId, java.lang.String def)
getAvailableThumbnails
in interface IExtendedContent
ticket
- objectId
- def
- public EnhancedObjectContent getThumbnail(java.lang.String ticket, java.lang.String objectId, java.lang.String thumbnailName)
IExtendedContent
getThumbnail
in interface IExtendedContent
Byte[]
- Byte Array containing the streamed content of the thumbnail imagepublic EnhancedObjectContent getThumbnailContent(java.lang.String ticket, java.lang.String objectId, java.lang.String thumbnailName)
public java.lang.String resolveVersion(java.lang.String ticket, java.lang.String objectId, java.lang.String label)
IExtendedContent
resolveVersion
in interface IExtendedContent
ticket
- an authentication ticketobjectId
- any objectId of a document tree to search for a version forlabel
- the "version label" of the document to search the tree for and returnpublic java.lang.String findFirstVersionId(java.lang.String ticket, java.lang.String objectId)
IExtendedContent
findFirstVersionId
in interface IExtendedContent
ticket
- an authentication ticketobjectId
- any objectId of a document tree to search for the first version fornull
if the no
objects with the given ID exist@Deprecated public java.lang.String legacyFindFirstVersion(java.lang.String ticket, java.lang.String objectId)
public java.lang.String findCurrentVersionId(java.lang.String ticket, java.lang.String objectId)
IExtendedContent
findCurrentVersionId
in interface IExtendedContent
ticket
- an authentication ticketobjectId
- any chronId of a document tree to search for the first version for@Deprecated public java.lang.String legacyFindCurrentVersionId(java.lang.String ticket, java.lang.String objectId)
public ExtendedContentResult getChildByName(java.lang.String ticket, java.lang.String parentId, java.lang.String childName)
IExtendedContent
objects
array is returned.getChildByName
in interface IExtendedContent
IExtendedContent.getChildByName(java.lang.String, java.lang.String, java.lang.String)
public java.lang.String findLatestVersionId(java.lang.String ticket, java.lang.String objectId)
IExtendedContent
findLatestVersionId
in interface IExtendedContent
ticket
- object
- Id of a documentReturns the object Id of the latest version of a document.
The objectId argument can be any object Id associated with
that specific version.
public boolean hasRelations(java.lang.String ticket, java.lang.String objectId, java.lang.String relationName, boolean parent)
IExtendedContent
hasRelations
in interface IExtendedContent
ticket
- String of the authentication ticketobjectId
- String to represent node's objectIdrelationName
- String of the relation to findparent
- boolean - if set to true, find parent relationship, else
find child relationshipIExtendedContent.hasRelations(String, String, String, boolean)
public java.util.List<org.alfresco.service.cmr.repository.AssociationRef> getAssociatedChildren(org.alfresco.service.ServiceRegistry serviceRegistry, org.alfresco.service.cmr.repository.NodeRef workstoreRef, org.alfresco.service.namespace.QName qname)
serviceRegistry
- - the serviceRegistry to use for our callworkstoreRef
- - the nodeRef that we want to get all children forqname
- - the association qname pattern to match againstpublic java.lang.String getChildVersion(org.alfresco.service.ServiceRegistry serviceRegistry, org.alfresco.service.cmr.repository.AssociationRef associationRef)
serviceRegistry
- - the serviceRegistry to use for our callassociationRef
- - a regular, named node relationpublic org.alfresco.service.cmr.version.Version getWorkspaceVersion(org.alfresco.service.ServiceRegistry serviceRegistry, org.alfresco.service.cmr.repository.NodeRef nodeRef)
serviceRegistry
- - the serviceRegistry to use for our callnodeRef
- - the nodeRef that we want to get all children forpublic java.lang.String getUUID(java.lang.String ticket, java.lang.String objectId)
IExtendedContent
getUUID
in interface IExtendedContent
public void changeType(java.lang.String ticket, java.lang.String objectId, java.lang.String newType)
IExtendedContent
changeType
in interface IExtendedContent
ticket
- an authentication ticketobjectId
- the object ID of a document you wish to change type fornewType
- the OCName of the target typepublic java.lang.String getContentPath(java.lang.String id, java.lang.String fileExtension)
IExtendedContent
getContentPath
in interface IExtendedContent
IExtendedContent.getContentPath(java.lang.String, java.lang.String)