public interface IContent
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.
|
java.util.List<ContentResult> |
bulkEnhancedCreateObjects(java.lang.String ticket,
java.util.List<EnhancedCompleteObject> objects)
Attempts to create new enhanced objects in the system, and returns the results.
|
java.util.List<ContentResult> |
bulkEnhancedCreateObjects(java.lang.String ticket,
java.util.List<EnhancedCompleteObject> objects,
java.util.HashMap<java.lang.String,java.lang.Object> additionalEventParams)
Attempts to create new enhanced objects in the system, and returns the results.
|
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)
Deprecated.
|
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 dataHandler)
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 |
enhancedCreateObject(java.lang.String ticket,
EnhancedCompleteObject object)
Attempts to create a new enhanced object in the system, and returns the result
expects an objectName property to be set in the object's properties
|
ContentResult |
enhancedCreateObject(java.lang.String ticket,
EnhancedCompleteObject object,
java.util.HashMap<java.lang.String,java.lang.Object> additionalEventParams)
Attempts to create a new enhanced object in the system, and returns the result
expects an objectName property to be set in the object's properties
|
ContentResult |
enhancedDeleteObject(java.lang.String ticket,
java.lang.String id,
boolean allVersions,
boolean forceDelete)
Retrieves document content and properties
|
ContentResult |
enhancedDeleteObject(java.lang.String ticket,
java.lang.String id,
boolean allVersions,
boolean forceDelete,
java.util.HashMap<java.lang.String,java.lang.Object> additionalEventParams)
Delete the object specified by id
|
ContentResult |
enhancedGetObject(java.lang.String ticket,
java.lang.String id,
java.lang.String[] fileExntesionArr)
Retrieves document content and properties.
|
ContentResult |
enhancedGetObjectByPath(java.lang.String ticket,
java.lang.String path,
java.lang.String[] fileExtensionArr)
Deprecated.
- Use getObjectByPath instead.
Obtain object by passing its path
WARNING: This method opens an InputStream. You must close this in the calling method.
|
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.
|
ContentResult |
enhancedUpdateObject(java.lang.String ticket,
java.lang.String id,
EnhancedCompleteObject object,
boolean newVersion,
boolean majorVersion)
Updates existing document object in the repository.
|
ContentResult |
enhancedUpdateObject(java.lang.String ticket,
java.lang.String id,
EnhancedCompleteObject object,
boolean newVersion,
boolean majorVersion,
java.util.HashMap<java.lang.String,java.lang.Object> additionalEventParams)
Updates existing document object in the repository.
|
java.net.URL |
generatePresignedUrl(java.lang.String ticket,
java.lang.String objectId,
java.lang.String[] fileExtensions,
boolean download,
boolean inline)
Returns a presigned url to requested content
|
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)
Deprecated.
use
enhancedGetObject(String, String, String[]) instead |
UserResult |
getLockOwner(java.lang.String ticket,
java.lang.String objectId)
Returns a UserResult.
|
OpenContentObject |
getObject(java.lang.String ticket,
java.lang.String id)
Obtain object by passing its unique id
|
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 objectId,
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.
|
OpenContentObject |
updateObject(java.lang.String ticket,
OpenContentObject oco)
Updates the object with the same ID as the id provided on the new object.
|
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.
|
@Deprecated ObjectContent getContent(GetContentRequest request)
enhancedGetObject(String, String, String[])
insteadGetContentRequest.setFileExtension(String[])
this method will attempt to return the PDF rendition first, and then the
native content if a PDF rendition does not exist.
Note - when using this method, the InputStream
contained within
ObjectContent.getContent()
must be closed after use.request
- a GetContentRequest
objectObjectContent
- the content of the objectjava.lang.String createObject(java.lang.String ticket, CompleteObject object)
ticket
- an authentication ticketobject
- a CompleteObject
objjava.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
- a CompleteObject
objnewVersion
- true to version or overwrite the existing object, otherwise falsemajorVersion
- true to increment the version to a new major version, otherwise falsetransformMimeType
- 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 versionsint getPermissionsRequest(java.lang.String ticket, java.lang.String objectId)
ticket
- an authentication ticketobjectId
- the identifier used to locate a documentboolean cancelCheckout(java.lang.String ticket, java.lang.String objectId)
ticket
- an authentication ticketobjectId
- the identifier used to locate a documentboolean checkout(java.lang.String ticket, java.lang.String objectId)
ticket
- an authentication ticketobjectId
- the identifier used to locate a documentjava.lang.String lockDocument(java.lang.String ticket, java.lang.String objectId)
ticket
- objectId
- java.lang.String unlockDocument(java.lang.String ticket, java.lang.String objectId)
ticket
- objectId
- UserResult getLockOwner(java.lang.String ticket, java.lang.String objectId)
ticket
- objectId
- 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. 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 dataHandler)
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.dataHandler
- the data handler containing the input stream for the new content of the checked in object.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)
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.size
- the object size in bytesnewVersion
- whether this should be a new version or the same version.dataHandler
- the data handler containing the input stream for the new content of the checked in object.@Deprecated ContentResult checkin(java.lang.String ticket, java.lang.String objectId, boolean keepLock, java.lang.String versionLabels, java.lang.String comment, boolean majorVersion)
checkin(String, String, boolean, String, String, boolean, OpenContentObject, boolean, DataHandler)
instead.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.java.lang.String[] addRelation(AddRelationRequest req)
req
- an AddRelationRequest
objectContentResult removeRelation(java.lang.String ticket, java.lang.String parentObjectId, java.lang.String[] childIds, java.lang.String relationName)
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 removejava.util.ArrayList<java.lang.String> link(java.lang.String ticket, java.lang.String objectId, java.lang.String[] unLinkFrom, java.lang.String[] linkTo)
ticket
- String representing the session's ticketobjectId
- 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 toContentResult enhancedCreateObject(java.lang.String ticket, EnhancedCompleteObject object)
ticket
- String representing the session's ticketobject
- EnhancedCompleteObject object to create in the systemContentResult enhancedCreateObject(java.lang.String ticket, EnhancedCompleteObject object, java.util.HashMap<java.lang.String,java.lang.Object> additionalEventParams)
ticket
- String representing the session's ticketobject
- EnhancedCompleteObject object to create in the systemadditionalEventParams
- HashMapjava.util.List<ContentResult> bulkEnhancedCreateObjects(java.lang.String ticket, java.util.List<EnhancedCompleteObject> objects)
ticket
- - String representing the session's ticket.objects
- - List of EnhancedCompleteObject objects to create in the system.java.util.List<ContentResult> bulkEnhancedCreateObjects(java.lang.String ticket, java.util.List<EnhancedCompleteObject> objects, java.util.HashMap<java.lang.String,java.lang.Object> additionalEventParams)
ticket
- - String representing the session's ticket.objects
- - List of EnhancedCompleteObject objects to create in the system.additionalEventParams
- - HashMapContentResult enhancedDeleteObject(java.lang.String ticket, java.lang.String id, boolean allVersions, boolean forceDelete)
ticket
- String representing the session's ticketid
- ID of the object to getfileExntesionArr
- An array of content types. By default, this array consists of {"pdf", ".*"}, which indicates PDF is preferred, then fall back to the native content.additionalParams
- HashMapContentResult enhancedDeleteObject(java.lang.String ticket, java.lang.String id, boolean allVersions, boolean forceDelete, java.util.HashMap<java.lang.String,java.lang.Object> additionalEventParams)
ticket
- String representing the session's ticketid
- ID of the object to deleteallVersions
- true to delete all versions of the object defined by id, otherwise falseforceDelete
- currently only implemented for Alfresco, otherwise falseadditionalEventParams
- HashMapContentResult
error
returns true if method failed, otherwise falseContentResult enhancedGetObject(java.lang.String ticket, java.lang.String id, java.lang.String[] fileExntesionArr)
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 getfileExntesionArr
- An array of content types. By default, this array consists of {"pdf", ".*"}, which indicates PDF is preferred, then fall back to the native content.additionalParams
- HashMapenhancedGetProperties(String, String)
,
OCUtil.closeQuietly(ContentResult)
ContentResult enhancedGetProperties(java.lang.String ticket, java.lang.String id)
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 objectContentResult enhancedUpdateObject(java.lang.String ticket, java.lang.String id, EnhancedCompleteObject object, boolean newVersion, boolean majorVersion)
ticket
- String representing the session's ticketid
- ID of the object to updateobject
- an EnhancedCompleteObject
newVersion
- true if the update will be saved to a new version, otherwise false.majorVersion
- true if the update will be saved to a major version, otherwise false.ContentResult enhancedUpdateObject(java.lang.String ticket, java.lang.String id, EnhancedCompleteObject object, boolean newVersion, boolean majorVersion, java.util.HashMap<java.lang.String,java.lang.Object> additionalEventParams)
ticket
- String representing the session's ticketid
- ID of the object to updateobject
- an EnhancedCompleteObject
newVersion
- true if the update will be saved to a new version, otherwise false.majorVersion
- true if the update will be saved to a major version, otherwise false.@Deprecated 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.OpenContentObject getObjectByPath(java.lang.String ticket, java.lang.String path)
ticket
- String representing the session's ticketpath
- path to the object to getOpenContentObject getObjectByPath(java.lang.String ticket, java.lang.String path, boolean quietMode)
ticket
- sessions ticketpath
- path to the object to hetquietMode
- If true, we will not throw an error if the object doesn't existOpenContentObject getObject(java.lang.String ticket, java.lang.String id)
ticket
- String representing the session's ticketpath
- Unique id of the object in the repositoryContentResult enhancedGetPathByFolderId(java.lang.String ticket, java.lang.String objectId)
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 ContentResult getObjectByVersion(java.lang.String ticket, java.lang.String id, java.lang.String versionLabel, java.lang.String[] fileExtensionArr)
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.ContentResult copyDocument(java.lang.String ticket, java.lang.String id, java.lang.String copyName)
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}".OpenContentObject updateObject(java.lang.String ticket, OpenContentObject oco)
ticket
- oco
- - The modified Objectjava.lang.UnsupportedOperationException
- if the underlying implementation does not support
update of objectType, aspect, or properties and an update was provided.OpenContentObject[] updateObjects(java.lang.String ticket, OpenContentObject[] ocos)
ticket
- ocos
- - The objects to updatejava.lang.UnsupportedOperationException
- if the underlying implementation does not support
update of objectType, aspect, or properties and an update was provided.java.util.List<java.lang.String> getAppliedAspects(java.lang.String ticket, java.lang.String objectId)
ticket
- objectId
- void applyAspect(java.lang.String ticket, java.lang.String objectId, java.lang.String aspectType, java.util.Map<java.lang.String,java.lang.Object> mandatoryProperties)
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 propertiesvoid moveObject(java.lang.String ticket, java.lang.String objectId, java.lang.String parentPathOrId)
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.java.net.URL generatePresignedUrl(java.lang.String ticket, java.lang.String objectId, java.lang.String[] fileExtensions, boolean download, boolean inline)
ticket
- objectId
- download
- - if set to true, will set the content-disposition header to 'attachment' so signal downloadinline
- - if set to true, will set the content-disposition header to 'inline' so that files are shown inline