|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The FileSystem Interface allows developers to perform basic file system tasks with iFS. Developers will expect to be able to copy, move, and delete documents...etc easily.
In addition to standard file system operations (such as copy, move, and delete), this interface expects some iFS-specific features that are at the core of our product (such as versioning and searching).
Method Summary | |
void |
addFolderRelationship(Folder folder,
PublicObject po)
Create a reference between a Folder and a PublicObject, essentially placing the PublicObject inside the Folder. |
void |
cancelCheckout(PublicObject po)
Cancel a checkout. |
DirectoryUser |
checkedOutBy(PublicObject po)
Return the DirectoryUser who currently has PublicObject po checked out, or null if po is not checked out. |
void |
checkIn(PublicObject po,
java.lang.String comment)
Implements the check-in semantics. |
PublicObject |
checkOut(PublicObject po,
boolean makeVersioned)
Implements the check-out semantics. |
Folder |
copy(Folder fromFolder,
Folder toFolder,
boolean recursive,
AccessControlList acl)
Copy a Folder into another Folder. |
PublicObject |
copy(PublicObject po,
Folder folder,
AccessControlList acl,
boolean overwrite)
Copy the PublicObject po into the specified folder. |
Document |
createDocument(java.lang.String name,
java.io.InputStream content,
java.lang.String folderPath,
AccessControlList acl,
boolean doParse,
ParserCallback callback)
Create a Document in iFS. |
Folder |
createFolder(java.lang.String name,
Folder destfolder,
boolean createParents,
AccessControlList acl)
Create a Folder in iFS. |
void |
delete(Folder folder,
boolean recursive)
Delete a Folder. |
void |
delete(PublicObject po)
Delete a PublicObject. |
PublicObject |
findPublicObjectById(java.lang.Long id)
Returns the PublicObject having the specified id . |
PublicObject |
findPublicObjectByPath(java.lang.String path)
Returns the PublicObject pointed to by path . |
AttributeValue |
getAttribute(PublicObject po,
java.lang.String attrName)
Return a specified attribute of a PublicObject. |
AttributeValue[] |
getAttributes(PublicObject po,
java.lang.String[] attrNames)
Return the specified attributes of a PublicObject. |
DirectoryUser |
getCurrentUser()
Display the current user in the session. |
java.io.InputStream |
getDocumentContent(Document doc)
Retrieve the content of a Document as a stream. |
VersionDescription[] |
getHistory(PublicObject po)
Retrieve the revision history of the specified PublicObject. |
LibrarySession |
getLibrarySession()
Return the LibrarySession object being used to communicate with iFS. |
Folder[] |
getParents(PublicObject po)
Return a list of parent Folders that reference the specified PublicObject. |
boolean |
isCheckedOut(PublicObject po)
Check to see if a PublicObject is currently checked out. |
boolean |
isVersioned(PublicObject po)
Check to see if a PublicObject is versioned. |
PublicObject[] |
listFolder(Folder folder,
java.lang.String pattern)
Return the items of the specified folder whose names match pattern . |
PublicObject |
makeVersioned(PublicObject po)
Convert an unversioned PublicObject into versioned PublicObject. |
PublicObject |
move(Folder fromFolder,
Folder toFolder,
PublicObject po,
java.lang.String newName,
AccessControlList acl,
boolean overwrite)
Move a PublicObject from fromFolder to
toFolder with the new name newName ; if
specified. |
void |
removeFolderRelationship(Folder folder,
PublicObject po,
boolean rmNoRef)
Removes the relationship between a Folder and a PublicObject. |
void |
rename(PublicObject po,
java.lang.String newName)
Rename a PublicObject. |
java.io.InputStream |
renderAsStream(PublicObject po,
java.lang.String rendererType,
java.lang.String rendererName)
Render the object out as a stream. |
void |
setAttribute(PublicObject po,
java.lang.String name,
AttributeValue value)
Set an attribute for a PublicObject in iFS. |
void |
setAttributes(PublicObject po,
java.lang.String[] names,
AttributeValue[] values)
Set attributes for a PublicObject in iFS. |
void |
setLibrarySession(LibrarySession session)
Set a new LibrarySession to communicate with iFS. |
Document |
updateDocument(java.lang.String name,
java.io.InputStream content,
java.lang.String folderPath,
AccessControlList acl,
boolean doParse,
ParserCallback callback)
Update a document in iFS. |
Method Detail |
public void addFolderRelationship(Folder folder, PublicObject po) throws IfsException
folder
- Folder object that will contain po
po
- PublicObject objectIfsException(68010)
- - if a po by that name already exists
in folder.public void cancelCheckout(PublicObject po) throws IfsException
po
- PublicObject object to be cancelledIfsException(68011)
- - if po is not checked out.IfsException(68012)
- - if po is not versioned.public void checkIn(PublicObject po, java.lang.String comment) throws IfsException
po
- PublicObject to be checked incomments
- CheckIn commentsIfsException(68011)
- - if po is not checked out.IfsException(68012)
- - if po is not versioned.public PublicObject checkOut(PublicObject po, boolean makeVersioned) throws IfsException
IfsException(68012)
- - if po is not versioned.IfsException(68014)
- - if po is already checked out.public DirectoryUser checkedOutBy(PublicObject po) throws IfsException
po
- PublicObjectIfsException(68012)
- - if po is not versioned.public PublicObject copy(PublicObject po, Folder folder, AccessControlList acl, boolean overwrite) throws IfsException
po
- PublicObject to copy fromfolder
- Folder object to copy toacl
- ACL to be applied to the newly created copy; if null,
session user's default ACL will be usedoverwrite
- If true, overwrite existing PublicObject in folderIfsException(68010)
- - if document already exists in folder.public Folder copy(Folder fromFolder, Folder toFolder, boolean recursive, AccessControlList acl) throws IfsException
fromFolder
- Folder to copy fromtoFolder
- Folder to copy torecursive
- If True, subfolders will be copiedacl
- ACL to be applied to the newly created copy of
fromFolder (but not its items); if null, session
user's default ACL will be usedIfsException
- - if operation failed.public Document createDocument(java.lang.String name, java.io.InputStream content, java.lang.String folderPath, AccessControlList acl, boolean doParse, ParserCallback callback) throws IfsException, java.io.IOException
name
- Name of the document to be createdcontent
- InputStream to read contents from; if null,
empty document is createdfolderPath
- Absolute path of folder in which to create
the documentacl
- ACL to be assigned to the new document; if null,
sess user's default ACL will be useddoParse
- If 'True', input stream will be parsed using a parser
which is determined based on the file extensioncallback
- Parser callback to be specified if doParse
is 'True'IfsException(68003)
- - if folderPath
is not a
Folder.IfsException(68004)
- - if folderPath
is not found.IfsException(68010)
- - if a document by that name already
exists.public Folder createFolder(java.lang.String name, Folder destfolder, boolean createParents, AccessControlList acl) throws IfsException
name
- Name of the Folder to be created; name can also be in
the format of a path (relative to destFolder) if
createParents is 'True' (eg. "a/b/c")destfolder
- Folder in which to create the new foldercreateParents
- If true, non-existing parent folders will be createdacl
- ACL to be assigned to new folder(s) created;
if null, session user's default ACL will be usedIfsException
- - if operation failed.public void delete(PublicObject po) throws IfsException
po
- PublicObject to be deleted.IfsException
- - if operation failed.public void delete(Folder folder, boolean recursive) throws IfsException
folder
- Folder object to be deletedrecursive
- If 'True', subfolders will be deletedIfsException(68020)
- - if folder
is non-empty,
and recursive
is 'False'.public PublicObject findPublicObjectById(java.lang.Long id) throws IfsException
id
.id
- Id of the PublicObjectIfsException
- - if operation failed.public PublicObject findPublicObjectByPath(java.lang.String path) throws IfsException
path
.path
- Path to the PublicObjectIfsException
- - if operation failed.public AttributeValue getAttribute(PublicObject po, java.lang.String attrName) throws IfsException
po
- PublicObject from which to get the attributeattrName
- Name of the attributeIfsException
- - if operation failed.public AttributeValue[] getAttributes(PublicObject po, java.lang.String[] attrNames) throws IfsException
po
- PublicObject from which to get the attributesattrNames
- A list of attributes to returnIfsException
- - if operation failed.public DirectoryUser getCurrentUser() throws IfsException
IfsException
- - if operation failed.public java.io.InputStream getDocumentContent(Document doc) throws IfsException, java.io.IOException
doc
- Document from which to retrieve contentIfsException
- - if operation failed.public VersionDescription[] getHistory(PublicObject po) throws IfsException
po
- PublicObject from which to get historyIfsException(68012)
- - if po
is not versioned.public LibrarySession getLibrarySession()
None
- public Folder[] getParents(PublicObject po) throws IfsException
po
- PublicObject from which to retrieve parentsIfsException
- - if operation failed.public boolean isCheckedOut(PublicObject po) throws IfsException
po
- PublicObjectIfsException(68012)
- - if po is not versioned.public boolean isVersioned(PublicObject po) throws IfsException
po
- PublicObjectIfsException
- - if operation failed.public PublicObject[] listFolder(Folder folder, java.lang.String pattern) throws IfsException
pattern
.folder
- Folder to list contents ofpattern
- Filename pattern to be matchedIfsException
- - if operation failed.public PublicObject makeVersioned(PublicObject po) throws IfsException
doc
- Unversioned document to convertIfsException
- - if operation failed.public PublicObject move(Folder fromFolder, Folder toFolder, PublicObject po, java.lang.String newName, AccessControlList acl, boolean overwrite) throws IfsException
fromFolder
to
toFolder
with the new name newName
; if
specified.fromFolder
- Folder in which the PO belongstoFolder
- Folder to which to move POpo
- PublicObject to movenewName
- New name to be assigned to the moved POacl
- ACL to be used on the moved object; if null,
acl will not be touchedoverwrite
- If 'True', overwrite existing PublicObject in folderIfsException(68018)
- - if po is checked out.IfsException(68019)
- - if po is an unfoldered version document.public void removeFolderRelationship(Folder folder, PublicObject po, boolean rmNoRef) throws IfsException
rmNoRef
is 'True', po
will be deleted
if there are no other relationships existing for po
.folder
- Folder which contains a reference to po
po
- PublicObject from which to remove referencermNoRef
- If True, po
will be removed when
there are no more existing relationshipsIfsException
- - if operation failed.delete(PublicObject)
public void rename(PublicObject po, java.lang.String newName) throws IfsException
po
- PublicObject to be renamednewName
- New name to be assignedIfsException(68005)
- - if newName already exists.public java.io.InputStream renderAsStream(PublicObject po, java.lang.String rendererType, java.lang.String rendererName) throws IfsException
po
- PublicObjectrendererType
- StringrendererName
- Stringpublic void setAttribute(PublicObject po, java.lang.String name, AttributeValue value) throws IfsException
po
- PublicObject for which to set the attributename
- Name of the attributevalue
- Attribute value to be setIfsException
- if operation failed.public void setAttributes(PublicObject po, java.lang.String[] names, AttributeValue[] values) throws IfsException
po
- PublicObject for which to set the attributesnames
- Namess of the attributesvalues
- Attribute values to be setIfsException
- - if operation failed.public void setLibrarySession(LibrarySession session) throws IfsException
session
- LibrarySession objectpublic Document updateDocument(java.lang.String name, java.io.InputStream content, java.lang.String folderPath, AccessControlList acl, boolean doParse, ParserCallback callback) throws IfsException, java.io.IOException
name
- Name of the documentcontent
- InputStream from which to read the document contentsfolderPath
- Absolute path of folder in which to update
the documentacl
- ACL to be assigned to the document; if null,
session user's default ACL will be useddoParse
- If 'True', input stream will be parsed using a parser
which is determined based on the file extensioncallback
- Parser callback to be specified if doParse is 'True'IfsException(68003)
- if folderPath is not a Folder.IfsException(68004)
- if folderPath is not found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |