|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.document.service.DocumentService
public class DocumentService
This Service manages document actions (create, move, delete, validate ...) and notify listeners.
| Method Summary | |
|---|---|
void |
archiveDocument(Document document,
fr.paris.lutece.portal.business.user.AdminUser user,
int nStateId)
Archive a document |
void |
changeDocumentState(Document document,
fr.paris.lutece.portal.business.user.AdminUser user,
int nStateId)
Change the state of the document |
void |
createDocument(Document document,
fr.paris.lutece.portal.business.user.AdminUser user)
Create a new document |
void |
getActions(Document document,
java.util.Locale locale,
fr.paris.lutece.portal.business.user.AdminUser user)
Add to the document all permitted actions according to the current user and using the current locale |
java.lang.String |
getCreateForm(java.lang.String strDocumentTypeCode,
java.util.Locale locale,
java.lang.String strBaseUrl)
Build an HTML form for the document creation for a given document type |
java.lang.String |
getDocumentData(fr.paris.lutece.portal.web.upload.MultipartHttpServletRequest mRequest,
Document document,
java.util.Locale locale)
Return the data of a document object |
static DocumentService |
getInstance()
Get the unique instance of the service |
java.lang.String |
getModifyForm(Document document,
java.util.Locale locale,
java.lang.String strBaseUrl)
Build an HTML form for the document modification for a given document |
java.lang.String |
getModifyForm(java.lang.String strDocumentId,
java.util.Locale locale,
java.lang.String strBaseUrl)
Build an HTML form for the document modification for a given document ID. |
void |
getPublishedStatus(Document document)
|
boolean |
isAuthorizedAdminDocument(int nIdSpace,
java.lang.String strDocumentTypeId,
java.lang.String strPermission,
fr.paris.lutece.portal.business.user.AdminUser user)
Check that a given user is allowed to access a document type for a given permission in a document space specified in parameter If permission is document creation, check if document creation is allowed for the specified space. |
void |
modifyDocument(Document document,
fr.paris.lutece.portal.business.user.AdminUser user)
Modify a the content of a document |
void |
moveDocument(Document document,
fr.paris.lutece.portal.business.user.AdminUser user,
int nNewSpace)
Move a document from a space to another |
void |
validateDocument(Document document,
fr.paris.lutece.portal.business.user.AdminUser user,
int nStateId)
Validate a document |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static DocumentService getInstance()
public void changeDocumentState(Document document,
fr.paris.lutece.portal.business.user.AdminUser user,
int nStateId)
throws DocumentException
document - The documentuser - The user doing the actionnStateId - The new state Id
DocumentException - raise when error occurs in event or rule
public void createDocument(Document document,
fr.paris.lutece.portal.business.user.AdminUser user)
throws DocumentException
document - The documentuser - The user doing the action
DocumentException - raise when error occurs in event or rule
public void modifyDocument(Document document,
fr.paris.lutece.portal.business.user.AdminUser user)
throws DocumentException
document - The documentuser - The user doing the action
DocumentException - raise when error occurs in event or rule
public void validateDocument(Document document,
fr.paris.lutece.portal.business.user.AdminUser user,
int nStateId)
throws DocumentException
nStateId - The new state id for a validated documentdocument - The documentuser - The user doing the action
DocumentException - raise when error occurs in event or rule
public void archiveDocument(Document document,
fr.paris.lutece.portal.business.user.AdminUser user,
int nStateId)
throws DocumentException
nStateId - The new state id for a validated documentdocument - The documentuser - The user doing the action
DocumentException - raise when error occurs in event or rule
public void moveDocument(Document document,
fr.paris.lutece.portal.business.user.AdminUser user,
int nNewSpace)
throws DocumentException
document - The documentuser - The user doing the actionnNewSpace - The Id of the destination space
DocumentException - raise when error occurs in event or rule
public void getActions(Document document,
java.util.Locale locale,
fr.paris.lutece.portal.business.user.AdminUser user)
user - The current userdocument - The documentlocale - The Localepublic void getPublishedStatus(Document document)
public java.lang.String getCreateForm(java.lang.String strDocumentTypeCode,
java.util.Locale locale,
java.lang.String strBaseUrl)
strDocumentTypeCode - The Document type codelocale - The LocalestrBaseUrl - The base Url
public java.lang.String getModifyForm(java.lang.String strDocumentId,
java.util.Locale locale,
java.lang.String strBaseUrl)
strDocumentId - The Id of the document to modifylocale - The LocalestrBaseUrl - The base url
public java.lang.String getModifyForm(Document document,
java.util.Locale locale,
java.lang.String strBaseUrl)
document - The documentlocale - The LocalestrBaseUrl - The base url
public boolean isAuthorizedAdminDocument(int nIdSpace,
java.lang.String strDocumentTypeId,
java.lang.String strPermission,
fr.paris.lutece.portal.business.user.AdminUser user)
nIdSpace - the id of the document spacestrDocumentTypeId - the id of the type document being consideredstrPermission - the permission neededuser - the user trying to access the ressource
public java.lang.String getDocumentData(fr.paris.lutece.portal.web.upload.MultipartHttpServletRequest mRequest,
Document document,
java.util.Locale locale)
mRequest - The MultipartHttpServletRequestdocument - The document object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||