lumis.service.document
Class DocumentManager

Package class diagram package DocumentManager
java.lang.Object
  extended by lumis.service.document.DocumentManager
All Implemented Interfaces:
IDocumentManager

public class DocumentManager
extends Object
implements IDocumentManager

Since:
4.0.0

Field Summary
protected  IResource resource
           
 
Fields inherited from interface lumis.service.document.IDocumentManager
TYPE_ALL
 
Constructor Summary
DocumentManager()
           
 
Method Summary
 DocumentConfig get(SessionConfig sessionConfig, String documentId, ITransaction transaction)
          Returns the DocumentConfig for a document with the given id.
 Collection<DocumentConfig> getChildren(SessionConfig sessionConfig, String serviceInstanceId, String folderId, int type, ITransaction transaction)
          Returns the entries in the specified folder.
 Collection<String> getFolderIdsByParentAndName(SessionConfig sessionConfig, String serviceInstanceId, String parentFolderId, String folderName, ITransaction transaction)
          Returns the ids of the folders child of the given parent and with the given name.
 String getFolderPath(SessionConfig sessionConfig, String folderId, ITransaction transaction)
          Returns the virtual path to the folder.
 void moveDocument(SessionConfig sessionConfig, String documentId, String destFolderId, ITransaction transaction)
          Moves a document (or a folder) to another folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resource

protected IResource resource
Constructor Detail

DocumentManager

public DocumentManager()
Method Detail

get

public DocumentConfig get(SessionConfig sessionConfig,
                          String documentId,
                          ITransaction transaction)
                   throws PortalException
Description copied from interface: IDocumentManager
Returns the DocumentConfig for a document with the given id.

Specified by:
get in interface IDocumentManager
Parameters:
sessionConfig - identifier for the session.
documentId - the id of the document.
transaction - the transaction for persistence access.
Returns:
the DocumentConfig for the document, or null if it is not found.
Throws:
PortalException

getFolderIdsByParentAndName

public Collection<String> getFolderIdsByParentAndName(SessionConfig sessionConfig,
                                                      String serviceInstanceId,
                                                      String parentFolderId,
                                                      String folderName,
                                                      ITransaction transaction)
                                               throws PortalException
Description copied from interface: IDocumentManager
Returns the ids of the folders child of the given parent and with the given name.

Specified by:
getFolderIdsByParentAndName in interface IDocumentManager
Parameters:
sessionConfig - identifier for the session.
serviceInstanceId - the content's service instance id.
parentFolderId - the parent folder's id. Null if the folder must not have parent.
folderName - the folder name.
transaction - the transaction for persistence access.
Returns:
Throws:
PortalException

getChildren

public Collection<DocumentConfig> getChildren(SessionConfig sessionConfig,
                                              String serviceInstanceId,
                                              String folderId,
                                              int type,
                                              ITransaction transaction)
                                       throws PortalException
Description copied from interface: IDocumentManager
Returns the entries in the specified folder.

Specified by:
getChildren in interface IDocumentManager
Parameters:
sessionConfig - identifier for the session.
serviceInstanceId - the document service instance id.
folderId - the id of the folder.
type - the entry types to be returned. Must be DocumentConfig.TYPE_FOLDER, DocumentConfig.TYPE_DOCUMENT or IDocumentManager.TYPE_ALL.
transaction - the transaction for persistence access.
Returns:
the entries in the specified folder, or an empty collection if none is found.
Throws:
PortalException

getFolderPath

public String getFolderPath(SessionConfig sessionConfig,
                            String folderId,
                            ITransaction transaction)
                     throws PortalException
Description copied from interface: IDocumentManager
Returns the virtual path to the folder.

Specified by:
getFolderPath in interface IDocumentManager
Parameters:
sessionConfig - identifier for the session.
folderId - the id of the folder.
transaction - the transaction for persistence access.
Returns:
the virtual path to the folder.
Throws:
PortalException

moveDocument

public void moveDocument(SessionConfig sessionConfig,
                         String documentId,
                         String destFolderId,
                         ITransaction transaction)
                  throws PortalException
Description copied from interface: IDocumentManager
Moves a document (or a folder) to another folder.

Specified by:
moveDocument in interface IDocumentManager
Parameters:
sessionConfig - identifier for the session.
documentId - the document's id.
destFolderId - the id of the destination folder.
transaction - the transaction for persistence access.
Throws:
PortalException


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.