public interface AttachDocumentAction extends CSOAction
+--------------------------+ | | | AttachDocumentAction | | | +--------------------------+ | ^ | | | | V | +----------------------------+ | | | AttachDocumentSynchronizer | | | +----------------------------+ | ^ | | | | V | +-----------------------------+ | | |AttachDocumentProcessorThread| | | +-----------------------------+The AttachDocumentAction interface receives the documents to attach for a specified registry object and hands it over to the AttachDocumentProcessorThread, where, in case if any of the attached document is dependent on another document then the same instructs the AttachDocumentAction about the missing document.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCurrentState()
Returns status of the document process.
|
java.util.Collection<CentraSiteRegistryObject> |
getExistingAssets()
Returns existing dependent assets for the specified asset's document.
|
java.lang.String |
getMainAssetFileName()
Return the initially attached document original name.
|
java.lang.String |
getMainAssetId()
Return the Main Asset Id created using the attached documents.
|
java.lang.String |
getMessage()
If the AttachDocumentProcessor fails to process the document, this
returns the root cause message.
|
java.lang.String |
getMissingFileName()
Returns the missing file name to be uploaded by the user.
|
java.util.Collection<AssetSupportedOption> |
getSupportedOptions()
Returns a collection of
AssetSupportedOption . |
void |
setAssetName(java.lang.String assetName)
Sets the name for the asset.
|
void |
setCreateVersion(boolean createVersion)
If createVersion is true, creates an asset with the next available
version and given document.
|
void |
setCredentials(java.net.PasswordAuthentication credentials)
Sets the credentials in case of a need to protect documents.
|
void |
setDocument(java.io.InputStream document)
Sets the document content as InputStream.
|
void |
setDocument(java.lang.String uri)
Sets the location of the document to the specified URI.
|
void |
setInteractiveResolution(boolean interactiveResolution)
If the set interactive resolution is true, then the system won't interact
with the user in case missing document already exists.
|
void |
setOrigionalName(java.lang.String origionalName)
Sets the display name for the attached main document.
|
void |
setOverwriteExisting(boolean overwrite)
If overwrite is true, overwrites the existing document attached to the
asset.
|
void |
setReuseAsset(java.lang.String csoId)
If a dependent asset exists, sets the user specified asset Id to attach
to the asset.
|
void |
setUserVersion(java.lang.String assetName)
Sets the user-defined version identifier for the asset.
|
cancel, executeNextStep, executePreviousStep, finishAllSteps, getGroup, getIconURL, getId, getName, getSkippedObjectsWithReason, isAllowed, isApplicable, setObjects
void setDocument(java.lang.String uri) throws CLLException
uri
- A specific location for the file.CLLException
- in case if URI is null.void setDocument(java.io.InputStream document) throws CLLException
document
- the document to be attached as InputStream.CLLException
- If the document specified by the user is
null or failed to create the file with the given input.void setOrigionalName(java.lang.String origionalName) throws CLLException
origionalName
- the display name for the main document.CLLException
- If an error occurs while setting the original namevoid setAssetName(java.lang.String assetName)
assetName
- The name for the asset.void setUserVersion(java.lang.String assetName)
assetName
- the user-defined version identifier for the asset.void setCredentials(java.net.PasswordAuthentication credentials)
credentials
- the PasswordAuthentication that wraps the username and
password.java.lang.String getCurrentState()
AttachDocumentState
for the supported states.getCurrentState
in interface CSOAction
java.util.Collection<CentraSiteRegistryObject> getExistingAssets() throws CLLException
Collection
of existing dependent assets as CentraSiteRegistryObject
s; however if user creates
versioned objects then the list contains more than one element.CLLException
- In case of a failure to get the existing assets that
are dependent on the specified asset's document.java.lang.String getMissingFileName()
void setReuseAsset(java.lang.String csoId) throws CLLException
csoId
- CentraSiteObject.getId()
CLLException
- In case of a failure to get the
CentraSiteRegistryObject
with the specified Id.void setOverwriteExisting(boolean overwrite)
overwrite
- If true, overwrites the existing document attached to the asset.void setCreateVersion(boolean createVersion)
createVersion
- If true, create a new version of the specified asset with the
given document.void setInteractiveResolution(boolean interactiveResolution)
interactiveResolution
- If true, interact with the user for resolving the
missing documents.java.lang.String getMessage()
java.util.Collection<AssetSupportedOption> getSupportedOptions() throws CLLException
AssetSupportedOption
.Collection
of AssetSupportedOption
CLLException
java.lang.String getMainAssetId()
java.lang.String getMainAssetFileName()