public class RepositoryDocument
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
RepositoryDocument.Security
This class describes allow and deny tokens for a specific security class.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
protected java.io.InputStream |
binaryFieldData |
protected long |
binaryLength |
protected java.lang.String |
contentMimeType |
protected java.util.Date |
createdDate |
protected java.util.Map<java.lang.String,java.util.Date[]> |
dateFields |
protected java.util.Map<java.lang.String,java.lang.Object> |
fields |
protected java.util.Set<java.lang.String> |
fieldSet |
protected java.lang.String |
fileName |
protected java.util.Date |
indexingDate |
protected java.util.Date |
modifiedDate |
protected java.lang.Long |
originalSize |
protected java.util.Map<java.lang.String,java.io.Reader[]> |
readerFields |
protected java.util.List<java.lang.String> |
rootPath |
static java.lang.String |
SECURITY_TYPE_DIRECTORY_LEVEL |
static java.lang.String |
SECURITY_TYPE_DOCUMENT |
static java.lang.String |
SECURITY_TYPE_PARENT |
static java.lang.String |
SECURITY_TYPE_SHARE |
protected java.util.Map<java.lang.String,RepositoryDocument.Security> |
securityLevels |
protected java.util.List<java.lang.String> |
sourcePath |
protected java.util.Map<java.lang.String,java.lang.String[]> |
stringFields |
Constructor and Description |
---|
RepositoryDocument()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(java.lang.String fieldName,
java.util.Date fieldData)
Add/remove a date field.
|
void |
addField(java.lang.String fieldName,
java.util.Date[] fieldData)
Add/remove a multivalue date field.
|
void |
addField(java.lang.String fieldName,
java.io.Reader fieldData)
Add/remove a character field.
|
void |
addField(java.lang.String fieldName,
java.io.Reader[] fieldData)
Add/remove a multivalue character field.
|
void |
addField(java.lang.String fieldName,
java.lang.String fieldData)
Add a character field.
|
void |
addField(java.lang.String fieldName,
java.lang.String[] fieldData)
Add/Remove a multivalue character field.
|
void |
clearFields()
Clear all fields.
|
RepositoryDocument |
duplicate()
Create an exact duplicate of this Repository Document.
|
int |
fieldCount()
Get the number of fields.
|
long |
getBinaryLength()
Get the binary length.
|
java.io.InputStream |
getBinaryStream()
Get the binary fields (if any).
|
java.util.Date |
getCreatedDate()
Get the document's created date.
|
java.lang.Object[] |
getField(java.lang.String fieldName)
Get a field.
|
java.util.Date[] |
getFieldAsDates(java.lang.String fieldName)
Get field as an array of Date objects.
|
java.io.Reader[] |
getFieldAsReaders(java.lang.String fieldName)
Get a field as an array of Readers.
|
java.lang.String[] |
getFieldAsStrings(java.lang.String fieldName)
Get a field as an array of strings.
|
java.util.Iterator<java.lang.String> |
getFields()
Iterate through the field name Strings.
|
java.lang.String |
getFileName()
Get the file Name.
|
java.util.Date |
getIndexingDate()
Get the document's indexing date.
|
java.lang.String |
getMimeType()
Get the document's mime type.
|
java.util.Date |
getModifiedDate()
Get the document's modified date.
|
java.lang.Long |
getOriginalSize()
Get the document's original size.
|
java.util.List<java.lang.String> |
getRootPath()
Get the root path for the document.
|
java.lang.String[] |
getSecurityACL(java.lang.String securityType)
Get security acl for a given security type.
|
java.lang.String[] |
getSecurityDenyACL(java.lang.String securityType)
Get security deny acl for a given security type.
|
protected RepositoryDocument.Security |
getSecurityLevel(java.lang.String securityType)
Locate or create a specified security level.
|
java.util.List<java.lang.String> |
getSourcePath()
Get the source path for the document.
|
void |
removeField(java.lang.String fieldName)
Remove a field.
|
java.util.Iterator<java.lang.String> |
securityTypesIterator()
Enumerate the active security types for this document.
|
void |
setBinary(java.io.InputStream binaryFieldData,
long binaryLength)
Set the binary field.
|
void |
setCreatedDate(java.util.Date date)
Set the document's created date.
|
void |
setFileName(java.lang.String fileName)
Set the file name.
|
void |
setIndexingDate(java.util.Date date)
Set the document's indexing date.
|
void |
setMimeType(java.lang.String mimeType)
Set the document's mime type.
|
void |
setModifiedDate(java.util.Date date)
Set the document's last-modified date.
|
void |
setOriginalSize(java.lang.Long size)
Set the document's original (repository) size.
|
void |
setRootPath(java.util.List<java.lang.String> rootPath)
Set the root path for the document.
|
void |
setSecurity(java.lang.String securityType,
java.lang.String[] acl,
java.lang.String[] denyAcl)
Set security values for a given security type.
|
void |
setSecurityACL(java.lang.String securityType,
java.lang.String[] acl)
Set security acl for a given security type.
|
void |
setSecurityDenyACL(java.lang.String securityType,
java.lang.String[] denyAcl)
Set security deny acl for a given security type.
|
void |
setSourcePath(java.util.List<java.lang.String> sourcePath)
Set the source path for the document.
|
public static final java.lang.String _rcsid
public static final java.lang.String SECURITY_TYPE_DOCUMENT
public static final java.lang.String SECURITY_TYPE_SHARE
public static final java.lang.String SECURITY_TYPE_PARENT
public static final java.lang.String SECURITY_TYPE_DIRECTORY_LEVEL
protected java.io.InputStream binaryFieldData
protected long binaryLength
protected final java.util.Set<java.lang.String> fieldSet
protected final java.util.Map<java.lang.String,java.lang.Object> fields
protected final java.util.Map<java.lang.String,java.lang.String[]> stringFields
protected final java.util.Map<java.lang.String,java.io.Reader[]> readerFields
protected final java.util.Map<java.lang.String,java.util.Date[]> dateFields
protected final java.util.Map<java.lang.String,RepositoryDocument.Security> securityLevels
protected final java.util.List<java.lang.String> sourcePath
protected final java.util.List<java.lang.String> rootPath
protected java.lang.String fileName
protected java.lang.String contentMimeType
protected java.util.Date createdDate
protected java.util.Date modifiedDate
protected java.util.Date indexingDate
protected java.lang.Long originalSize
public RepositoryDocument duplicate()
public void clearFields()
public void setSourcePath(java.util.List<java.lang.String> sourcePath)
sourcePath
- is the path.public java.util.List<java.lang.String> getSourcePath()
public void setRootPath(java.util.List<java.lang.String> rootPath)
rootPath
- is the path.public java.util.List<java.lang.String> getRootPath()
public void setOriginalSize(java.lang.Long size)
size
- is the size.public java.lang.Long getOriginalSize()
public void setCreatedDate(java.util.Date date)
date
- is the date.public java.util.Date getCreatedDate()
public void setModifiedDate(java.util.Date date)
date
- is the date.public java.util.Date getModifiedDate()
public void setIndexingDate(java.util.Date date)
date
- is the date.public java.util.Date getIndexingDate()
public void setMimeType(java.lang.String mimeType)
mimeType
- is the mime type.public java.lang.String getMimeType()
protected RepositoryDocument.Security getSecurityLevel(java.lang.String securityType)
securityType
- is the security type.public java.util.Iterator<java.lang.String> securityTypesIterator()
public void setSecurity(java.lang.String securityType, java.lang.String[] acl, java.lang.String[] denyAcl)
securityType
- is the security type.acl
- is the acl.denyAcl
- is the deny acl.public void setSecurityACL(java.lang.String securityType, java.lang.String[] acl)
securityType
- is the security type.acl
- is the acl;public void setSecurityDenyACL(java.lang.String securityType, java.lang.String[] denyAcl)
securityType
- is the security type.denyAcl
- is the deny acl.public java.lang.String[] getSecurityACL(java.lang.String securityType)
securityType
- is the security type.public java.lang.String[] getSecurityDenyACL(java.lang.String securityType)
securityType
- is the security type.public void setBinary(java.io.InputStream binaryFieldData, long binaryLength)
binaryFieldData
- is the input stream containing binary data.binaryLength
- is the length of the stream, in bytes. This is a REQUIRED parameter.public java.io.InputStream getBinaryStream()
public void setFileName(java.lang.String fileName)
fileName
- is the file name.public java.lang.String getFileName()
public long getBinaryLength()
public void removeField(java.lang.String fieldName)
fieldName
- is the field name.public void addField(java.lang.String fieldName, java.util.Date[] fieldData) throws ManifoldCFException
fieldName
- is the field name.fieldData
- is the multi-valued data (an array of Dates). Null means
to remove the entry.ManifoldCFException
public void addField(java.lang.String fieldName, java.util.Date fieldData) throws ManifoldCFException
fieldName
- is the field name.fieldData
- is the single-valued data (a Date). Null means "no value".ManifoldCFException
public void addField(java.lang.String fieldName, java.io.Reader[] fieldData) throws ManifoldCFException
fieldName
- is the field name.fieldData
- is the multi-valued data (as an array of Readers). Null means
to remove the entry from the document.ManifoldCFException
public void addField(java.lang.String fieldName, java.io.Reader fieldData) throws ManifoldCFException
fieldName
- is the field name.fieldData
- is the single-valued data (as a Reader). Null means "no value".ManifoldCFException
public void addField(java.lang.String fieldName, java.lang.String[] fieldData) throws ManifoldCFException
fieldName
- is the field name.fieldData
- is the multi-valued data (as a an array of Strings). Null means
to remove the entry from the document.ManifoldCFException
public void addField(java.lang.String fieldName, java.lang.String fieldData) throws ManifoldCFException
fieldName
- is the field name.fieldData
- is the single-valued data (as a String). Null means "no value".ManifoldCFException
public java.lang.Object[] getField(java.lang.String fieldName)
fieldName
- is the field name.public java.lang.String[] getFieldAsStrings(java.lang.String fieldName) throws java.io.IOException
fieldName
- is the field name.java.io.IOException
public java.io.Reader[] getFieldAsReaders(java.lang.String fieldName)
fieldName
- is the field name.public java.util.Date[] getFieldAsDates(java.lang.String fieldName)
fieldName
- is the field name.public int fieldCount()
public java.util.Iterator<java.lang.String> getFields()