public class RepositoryDocument extends 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 String |
_rcsid |
protected InputStream |
binaryFieldData |
protected long |
binaryLength |
protected String |
contentMimeType |
protected Date |
createdDate |
protected Map<String,Date[]> |
dateFields |
protected Map<String,Object> |
fields |
protected String |
fileName |
protected Date |
indexingDate |
protected Date |
modifiedDate |
protected Long |
originalSize |
protected Map<String,Reader[]> |
readerFields |
static String |
SECURITY_TYPE_DIRECTORY_LEVEL |
static String |
SECURITY_TYPE_DOCUMENT |
static String |
SECURITY_TYPE_PARENT |
static String |
SECURITY_TYPE_SHARE |
protected Map<String,RepositoryDocument.Security> |
securityLevels |
protected Map<String,String[]> |
stringFields |
Constructor and Description |
---|
RepositoryDocument()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDirectoryACLs(String[] allowACL,
String[] denyACL)
Deprecated.
|
void |
addField(String fieldName,
Date fieldData)
Add/remove a date field.
|
void |
addField(String fieldName,
Date[] fieldData)
Add/remove a multivalue date field.
|
void |
addField(String fieldName,
Reader fieldData)
Add/remove a character field.
|
void |
addField(String fieldName,
Reader[] fieldData)
Add/remove a multivalue character field.
|
void |
addField(String fieldName,
String fieldData)
Add a character field.
|
void |
addField(String fieldName,
String[] fieldData)
Add/Remove a multivalue character field.
|
void |
clearDirectoryACLs()
Deprecated.
|
void |
clearFields()
Clear all fields.
|
int |
countDirectoryACLs()
Deprecated.
|
RepositoryDocument |
duplicate()
Create an exact duplicate of this Repository Document.
|
int |
fieldCount()
Get the number of fields.
|
String[] |
getACL()
Deprecated.
|
long |
getBinaryLength()
Get the binary length.
|
InputStream |
getBinaryStream()
Get the binary fields (if any).
|
Date |
getCreatedDate()
Get the document's created date.
|
String[] |
getDenyACL()
Deprecated.
|
String[] |
getDirectoryACL(int index)
Deprecated.
|
String[] |
getDirectoryDenyACL(int index)
Deprecated.
|
Object[] |
getField(String fieldName)
Get a field.
|
Date[] |
getFieldAsDates(String fieldName)
Get field as an array of Date objects.
|
Reader[] |
getFieldAsReaders(String fieldName)
Get a field as an array of Readers.
|
String[] |
getFieldAsStrings(String fieldName)
Get a field as an array of strings.
|
Iterator<String> |
getFields()
Iterate through the field name Strings.
|
String |
getFileName()
Get the file Name.
|
Date |
getIndexingDate()
Get the document's indexing date.
|
String |
getMimeType()
Get the document's mime type.
|
Date |
getModifiedDate()
Get the document's modified date.
|
Long |
getOriginalSize()
Get the document's original size.
|
String[] |
getSecurityACL(String securityType)
Get security acl for a given security type.
|
String[] |
getSecurityDenyACL(String securityType)
Get security deny acl for a given security type.
|
protected RepositoryDocument.Security |
getSecurityLevel(String securityType)
Locate or create a specified security level.
|
String[] |
getShareACL()
Deprecated.
|
String[] |
getShareDenyACL()
Deprecated.
|
void |
removeField(String fieldName)
Remove a field.
|
Iterator<String> |
securityTypesIterator()
Enumerate the active security types for this document.
|
void |
setACL(String[] acl)
Deprecated.
|
void |
setBinary(InputStream binaryFieldData,
long binaryLength)
Set the binary field.
|
void |
setCreatedDate(Date date)
Set the document's created date.
|
void |
setDenyACL(String[] acl)
Deprecated.
|
void |
setFileName(String fileName)
Set the file name.
|
void |
setIndexingDate(Date date)
Set the document's indexing date.
|
void |
setMimeType(String mimeType)
Set the document's mime type.
|
void |
setModifiedDate(Date date)
Set the document's last-modified date.
|
void |
setOriginalSize(Long size)
Set the document's original (repository) size.
|
void |
setSecurity(String securityType,
String[] acl,
String[] denyAcl)
Set security values for a given security type.
|
void |
setSecurityACL(String securityType,
String[] acl)
Set security acl for a given security type.
|
void |
setSecurityDenyACL(String securityType,
String[] denyAcl)
Set security deny acl for a given security type.
|
void |
setShareACL(String[] acl)
Deprecated.
|
void |
setShareDenyACL(String[] acl)
Deprecated.
|
public static final String _rcsid
public static final String SECURITY_TYPE_DOCUMENT
public static final String SECURITY_TYPE_SHARE
public static final String SECURITY_TYPE_PARENT
public static final String SECURITY_TYPE_DIRECTORY_LEVEL
protected InputStream binaryFieldData
protected long binaryLength
protected final Map<String,RepositoryDocument.Security> securityLevels
protected String fileName
protected String contentMimeType
protected Date createdDate
protected Date modifiedDate
protected Date indexingDate
protected Long originalSize
public RepositoryDocument duplicate()
public void clearFields()
public void setOriginalSize(Long size)
size
- is the size.public Long getOriginalSize()
public void setCreatedDate(Date date)
date
- is the date.public Date getCreatedDate()
public void setModifiedDate(Date date)
date
- is the date.public Date getModifiedDate()
public void setIndexingDate(Date date)
date
- is the date.public Date getIndexingDate()
public void setMimeType(String mimeType)
mimeType
- is the mime type.public String getMimeType()
protected RepositoryDocument.Security getSecurityLevel(String securityType)
securityType
- is the security type.public Iterator<String> securityTypesIterator()
public void setSecurity(String securityType, String[] acl, String[] denyAcl)
securityType
- is the security type.acl
- is the acl.denyAcl
- is the deny acl.public void setSecurityACL(String securityType, String[] acl)
securityType
- is the security type.acl
- is the acl;public void setSecurityDenyACL(String securityType, String[] denyAcl)
securityType
- is the security type.denyAcl
- is the deny acl.public String[] getSecurityACL(String securityType)
securityType
- is the security type.public String[] getSecurityDenyACL(String securityType)
securityType
- is the security type.@Deprecated public void setACL(String[] acl)
acl
- is the allowed "file" access control token list for the document.@Deprecated public String[] getACL()
@Deprecated public void setDenyACL(String[] acl)
acl
- is the "file" denied access control token list for the document.@Deprecated public String[] getDenyACL()
@Deprecated public void setShareACL(String[] acl)
@Deprecated public String[] getShareACL()
@Deprecated public void setShareDenyACL(String[] acl)
@Deprecated public String[] getShareDenyACL()
@Deprecated public void clearDirectoryACLs()
@Deprecated public int countDirectoryACLs()
@Deprecated public void addDirectoryACLs(String[] allowACL, String[] denyACL)
@Deprecated public String[] getDirectoryACL(int index)
@Deprecated public String[] getDirectoryDenyACL(int index)
public void setBinary(InputStream binaryFieldData, long binaryLength)
binaryFieldData
- is the input stream containing binary data.public InputStream getBinaryStream()
public void setFileName(String fileName)
fileName
- is the file name.public String getFileName()
public long getBinaryLength()
public void removeField(String fieldName)
fieldName
- is the field name.public void addField(String fieldName, 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(String fieldName, 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(String fieldName, 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(String fieldName, 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(String fieldName, 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(String fieldName, String fieldData) throws ManifoldCFException
fieldName
- is the field name.fieldData
- is the single-valued data (as a String). Null means "no value".ManifoldCFException
public Object[] getField(String fieldName)
fieldName
- is the field name.public String[] getFieldAsStrings(String fieldName) throws IOException
fieldName
- is the field name.IOException
public Reader[] getFieldAsReaders(String fieldName)
fieldName
- is the field name.public Date[] getFieldAsDates(String fieldName)
fieldName
- is the field name.public int fieldCount()