public class DCTMContentImpl extends AbstractContentImpl
ocPolicyComponent
Modifier | Constructor and Description |
---|---|
protected |
DCTMContentImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
addRelation(AddRelationRequest req)
Adds a relation between parent document and children.
|
void |
applyAspect(java.lang.String ticket,
java.lang.String objectId,
java.lang.String aspectType,
java.util.Map<java.lang.String,java.lang.Object> mandatoryProperties)
Adds an aspect to a document.
|
boolean |
cancelCheckout(java.lang.String ticket,
java.lang.String objectId)
Cancels checkout of document.
|
ContentResult |
checkin(java.lang.String ticket,
java.lang.String objectId,
boolean keepLock,
java.lang.String versionLabels,
java.lang.String comment,
boolean majorVersion)
Checks in a document.
|
ContentResult |
checkin(java.lang.String ticket,
java.lang.String objectId,
boolean keepLock,
java.lang.String versionLabels,
java.lang.String comment,
boolean majorVersion,
OpenContentObject object,
boolean newVersion,
javax.activation.DataHandler dh)
Checks in a node to the repository.
|
ContentResult |
checkin(java.lang.String ticket,
java.lang.String objectId,
boolean keepLock,
java.lang.String versionLabels,
java.lang.String comment,
boolean majorVersion,
OpenContentObject object,
boolean newVersion,
java.lang.Long size,
javax.activation.DataHandler dataHandler)
Checks in a node to the repository.
|
boolean |
checkout(java.lang.String ticket,
java.lang.String objectId)
Checks out a document.
|
ContentResult |
copyDocument(java.lang.String ticket,
java.lang.String id,
java.lang.String copyName)
Returns objectId for the given copied document only, no content returned.
|
java.lang.String |
createObject(java.lang.String ticket,
CompleteObject object)
Imports document content and properties to the repository.
|
boolean |
deleteObjects(java.lang.String ticket,
java.lang.String[] objectIds,
boolean allVersions)
Deletes objects in the content store.
|
ContentResult |
doEnhancedCreateObject(java.lang.String ticket,
EnhancedCompleteObject object) |
ContentResult |
doEnhancedDeleteObject(java.lang.String ticket,
java.lang.String id,
boolean allVersions,
boolean forceDelete) |
ContentResult |
doEnhancedUpdateObject(java.lang.String ticket,
java.lang.String id,
EnhancedCompleteObject object,
boolean newVersion,
boolean majorVersion) |
OpenContentObject |
doUpdateObject(java.lang.String ticket,
OpenContentObject oco) |
ContentResult |
enhancedGetObject(java.lang.String ticket,
java.lang.String id,
java.lang.String[] fileExtensionArr)
Retrieves document content and properties.
|
ContentResult |
enhancedGetObjectByPath(java.lang.String ticket,
java.lang.String path,
java.lang.String[] fileExtensionArr) |
ContentResult |
enhancedGetPathByFolderId(java.lang.String ticket,
java.lang.String objectId)
Obtain folder path by passing in folder ID
|
ContentResult |
enhancedGetProperties(java.lang.String ticket,
java.lang.String id)
Returns metadata for the given id only, no content returned.
|
java.util.List<java.lang.String> |
getAppliedAspects(java.lang.String ticket,
java.lang.String objectId)
Retrieves a list of aspects applied to the provided objectId.
|
ObjectContent |
getContent(GetContentRequest request)
Retrieves the content of a repository object.
|
EnhancedObjectProperty[] |
getEnhancedProperties(java.lang.String ticket,
java.lang.String objectId)
Retrieves document properties.
|
UserResult |
getLockOwner(java.lang.String ticket,
java.lang.String objectId)
Returns a UserResult.
|
OpenContentObject |
getObjectByPath(java.lang.String ticket,
java.lang.String path)
Obtain object by passing its path
WARNING: This method opens an InputStream.
|
OpenContentObject |
getObjectByPath(java.lang.String ticket,
java.lang.String path,
boolean quietMode)
Obtain object by passing its path
This accepts a 'quietMode' parameter that will not throw an error if the object
doesn't exist at that path.
|
ContentResult |
getObjectByVersion(java.lang.String ticket,
java.lang.String id,
java.lang.String versionLabel,
java.lang.String[] fileExtensionArr)
Obtain object for a specific version
|
int |
getPermissionsRequest(java.lang.String ticket,
java.lang.String objectId)
Retrieves permissions set on document.
|
java.util.ArrayList<java.lang.String> |
link(java.lang.String ticket,
java.lang.String childId,
java.lang.String[] unLinkFrom,
java.lang.String[] linkTo)
Creates a link request between document and folders.
|
java.lang.String |
lockDocument(java.lang.String ticket,
java.lang.String objectId)
Locks a document.
|
void |
moveObject(java.lang.String ticket,
java.lang.String objectId,
java.lang.String parentPathOrId)
Moves an object in the repository from one folder to another.
|
ContentResult |
removeRelation(java.lang.String ticket,
java.lang.String parentObjectId,
java.lang.String[] childIds,
java.lang.String relationName)
Removes the relationship between the parentId and the childIds passed in of the relation type passed in
|
java.lang.String |
unlockDocument(java.lang.String ticket,
java.lang.String objectId)
Unlocks out a document.
|
java.lang.String |
updateObject(java.lang.String ticket,
java.lang.String objectId,
CompleteObject object,
boolean newVersion,
boolean majorVersion)
Updates existing document object in the repository.
|
OpenContentObject[] |
updateObjects(java.lang.String ticket,
OpenContentObject[] ocos)
Updates the objects with the same IDs as provided objects.
|
bulkEnhancedCreateObjects, bulkEnhancedCreateObjects, enhancedCreateObject, enhancedCreateObject, enhancedDeleteObject, enhancedDeleteObject, enhancedUpdateObject, enhancedUpdateObject, generatePresignedUrl, getObject, setOcPolicyComponent, updateObject
public EnhancedObjectProperty[] getEnhancedProperties(java.lang.String ticket, java.lang.String objectId)
ticket
- an authentication ticketobjectId
- the identifier used to locate a documentpublic ObjectContent getContent(GetContentRequest request)
request
- public java.lang.String createObject(java.lang.String ticket, CompleteObject object)
ticket
- an authentication ticketobject
- public java.lang.String updateObject(java.lang.String ticket, java.lang.String objectId, CompleteObject object, boolean newVersion, boolean majorVersion)
ticket
- an authentication ticketobjectId
- the identifier for the document to updateobject
- newVersion
- whether to version or overwrite the existing objectmajorVersion
- whether to increment the version to a new major version
if versioningpublic OpenContentObject[] updateObjects(java.lang.String ticket, OpenContentObject[] ocos)
IContent
ocos
- - The objects to updateIContent.updateObjects(String, com.tsgrp.opencontent.core.model.json.OpenContentObject[])
public boolean deleteObjects(java.lang.String ticket, java.lang.String[] objectIds, boolean allVersions)
ticket
- an authentication ticketobjectIds
- a list of object identifiers to deleteallVersions
- if true, deletes all versionspublic int getPermissionsRequest(java.lang.String ticket, java.lang.String objectId)
ticket
- an authentication ticketobjectId
- the identifier used to locate a documentpublic boolean cancelCheckout(java.lang.String ticket, java.lang.String objectId)
ticket
- an authentication ticketobjectId
- the identifier used to locate a documentpublic boolean checkout(java.lang.String ticket, java.lang.String objectId)
ticket
- an authentication ticketobjectId
- the identifier used to locate a documentpublic ContentResult checkin(java.lang.String ticket, java.lang.String objectId, boolean keepLock, java.lang.String versionLabels, java.lang.String comment, boolean majorVersion)
ticket
- an authentication ticketobjectId
- ID of the object to be checked inkeepLock
- whether or not to keep the lock on the objectversionLabels
- version label to check the document in tocomment
- comment about the checkinmajorVersion
- whether the object/document will be checked in as a major versionpublic ContentResult checkin(java.lang.String ticket, java.lang.String objectId, boolean keepLock, java.lang.String versionLabels, java.lang.String comment, boolean majorVersion, OpenContentObject object, boolean newVersion, java.lang.Long size, javax.activation.DataHandler dataHandler)
IContent
ticket
- a valid OC ticket.objectId
- the objectId of the object to check in.keepLock
- whether to keep the lock or release it after the checkin is complete.versionLabels
- the version lable of the document that will be checked in.comment
- the comment for checking in the document.majorVersion
- true if the document should become a major version on checkin.object
- the object to use for setting new property values on checkin - NOTE: this is currently not implemented.newVersion
- whether this should be a new version or the same version.size
- the object size in bytesdataHandler
- the data handler containing the input stream for the new content of the checked in object.public java.lang.String[] addRelation(AddRelationRequest req)
req
- public java.util.ArrayList<java.lang.String> link(java.lang.String ticket, java.lang.String childId, java.lang.String[] unLinkFrom, java.lang.String[] linkTo)
IContent
ticket
- String representing the session's ticketchildId
- ID of the object that is to be linkedunLinkFrom
- String[] representing the folders that the object will be unlinked fromlinkTo
- String[] representing the folders that the object will be linked toIContent.link(java.lang.String, java.lang.String, java.lang.String[], java.lang.String[])
public ContentResult doEnhancedCreateObject(java.lang.String ticket, EnhancedCompleteObject object)
doEnhancedCreateObject
in class AbstractContentImpl
IContent.enhancedCreateObject(java.lang.String, EnhancedCompleteObject)
public ContentResult doEnhancedDeleteObject(java.lang.String ticket, java.lang.String id, boolean allVersions, boolean forceDelete)
doEnhancedDeleteObject
in class AbstractContentImpl
forceDelete
- - Not Implemented for DCTM, should always be FalseIContent.enhancedDeleteObject(java.lang.String, java.lang.String, boolean, boolean)
public ContentResult enhancedGetObject(java.lang.String ticket, java.lang.String id, java.lang.String[] fileExtensionArr)
IContent
IContent.enhancedGetProperties(String, String)
instead. Note that since this method gets
both content and properties, calling code must close the ContentResult
with OCUtil.closeQuietly(ContentResult)
.ticket
- String representing the session's ticketid
- ID of the object to getfileExtensionArr
- An array of content types. By default, this array consists of {"pdf", ".*"}, which indicates PDF is preferred, then fall back to the native content.IContent.enhancedGetObject(java.lang.String, java.lang.String, java.lang.String[])
public ContentResult doEnhancedUpdateObject(java.lang.String ticket, java.lang.String id, EnhancedCompleteObject object, boolean newVersion, boolean majorVersion)
public ContentResult enhancedGetObjectByPath(java.lang.String ticket, java.lang.String path, java.lang.String[] fileExtensionArr)
ticket
- String representing the session's ticketpath
- path to the object to getfileExtensionArr
- An array of content types. By default, this array consists of {"pdf", ".*"}, which indicates PDF is preferred, then fall back to the native content.public ContentResult enhancedGetPathByFolderId(java.lang.String ticket, java.lang.String objectId)
IContent
ticket
- String representing the session's ticketobjectId
- id of the folder to get path fromContentResult
error
returns true if method failed, otherwise falseContentResult.result
contains the folder path we are trying to get IContent.enhancedGetPathByFolderId(java.lang.String, java.lang.String)
public ContentResult getObjectByVersion(java.lang.String ticket, java.lang.String id, java.lang.String versionLabel, java.lang.String[] fileExtensionArr)
IContent
ticket
- String representing the session's ticketid
- id of the object we are trying to getversionLabel
- version of the object we are trying to getfileExtensionArr
- An array of content types. By default, this array consists of {"pdf", ".*"}, which indicates PDF is preferred, then fall back to the native content.public ContentResult enhancedGetProperties(java.lang.String ticket, java.lang.String id)
IContent
ticket
- String representing the session's ticketid
- ID of the object to get properties fromContentResult
error
returns true if method failed, otherwise falseobject
objectType
- repo specific object typeprops
- metadata for objectIContent.enhancedGetProperties(java.lang.String, java.lang.String)
public ContentResult removeRelation(java.lang.String ticket, java.lang.String parentObjectId, java.lang.String[] childIds, java.lang.String relationName)
IContent
ticket
- An authentication ticketparentObjectId
- ID of the parent object to remove the rendition relation fromchildIds
- An array of child IDs to remove from relationrelationName
- - name of parent-child relation to removepublic ContentResult copyDocument(java.lang.String ticket, java.lang.String id, java.lang.String copyName)
IContent
ticket
- String representing the session's ticketid
- id of the object we want to make a copy ofcopyName
- name of the newly copied object. If set to null or "", the name of the new object will be "Copy of ${original object's name}".IContent.copyDocument(java.lang.String, java.lang.String, java.lang.String)
public java.lang.String lockDocument(java.lang.String ticket, java.lang.String objectId)
IContent
IContent.lockDocument(java.lang.String, java.lang.String)
public java.lang.String unlockDocument(java.lang.String ticket, java.lang.String objectId)
IContent
IContent.unlockDocument(java.lang.String, java.lang.String)
public UserResult getLockOwner(java.lang.String ticket, java.lang.String objectId)
IContent
UserResult
UserResult.getError()
- True if there is an error UserResult.getErrorDetails()
- Details about the error UserResult.getUserBeans()
- If the document is locked, an array of length 1, containing the userbean of the locking user or
null of there is no lock. public OpenContentObject doUpdateObject(java.lang.String ticket, OpenContentObject oco)
doUpdateObject
in class AbstractContentImpl
public OpenContentObject getObjectByPath(java.lang.String ticket, java.lang.String path)
IContent
ticket
- String representing the session's ticketpath
- path to the object to getpublic OpenContentObject getObjectByPath(java.lang.String ticket, java.lang.String path, boolean quietMode)
IContent
ticket
- sessions ticketpath
- path to the object to hetquietMode
- If true, we will not throw an error if the object doesn't existpublic java.util.List<java.lang.String> getAppliedAspects(java.lang.String ticket, java.lang.String objectId)
IContent
IContent.getAppliedAspects(java.lang.String, java.lang.String)
public void applyAspect(java.lang.String ticket, java.lang.String objectId, java.lang.String aspectType, java.util.Map<java.lang.String,java.lang.Object> mandatoryProperties)
IContent
ticket
- a valid OC ticketobjectId
- the object the aspect will be applied toaspectType
- the type of aspect to be added (in OCName format)mandatoryProperties
- a list of properties that are mandatory for the aspect (in OCName format). Set to null/empty map for no propertiesIContent.applyAspect(java.lang.String, java.lang.String, java.lang.String, java.util.Map)
public ContentResult checkin(java.lang.String ticket, java.lang.String objectId, boolean keepLock, java.lang.String versionLabels, java.lang.String comment, boolean majorVersion, OpenContentObject object, boolean newVersion, javax.activation.DataHandler dh)
IContent
ticket
- a valid OC ticket.objectId
- the objectId of the object to check in.keepLock
- whether to keep the lock or release it after the checkin is complete.versionLabels
- the version lable of the document that will be checked in.comment
- the comment for checking in the document.majorVersion
- true if the document should become a major version on checkin.object
- the object to use for setting new property values on checkin - NOTE: this is currently not implemented.newVersion
- whether this should be a new version or the same version.dh
- the data handler containing the input stream for the new content of the checked in object.public void moveObject(java.lang.String ticket, java.lang.String objectId, java.lang.String parentPathOrId)
IContent
ticket
- a valid OC ticket.objectId
- the ID of the object to move to a new folder.parentPathOrId
- the path or ID of the folder to move the new object to.