|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.web.RESTWebService
org.silverpeas.attachment.web.AbstractSimpleDocumentResource
org.silverpeas.attachment.web.SimpleDocumentResource
@Service @RequestScoped @Authorized public class SimpleDocumentResource
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.silverpeas.web.RESTWebService |
---|
RESTWebService.WebProcess<RETURN_VALUE>, RESTWebService.WebTreatment<RETURN_VALUE> |
Field Summary |
---|
Fields inherited from class com.silverpeas.web.RESTWebService |
---|
RESPONSE_HEADER_ARRAYSIZE, REST_WEB_SERVICES_URI_BASE |
Constructor Summary | |
---|---|
SimpleDocumentResource()
|
Method Summary | |
---|---|
void |
deleteContent(String lang)
Deletes the the specified document. |
void |
deleteDocument()
Deletes the the specified document. |
SimpleDocumentEntity |
getDocument(String lang)
Returns the specified document in the specified lang. |
SimpleDocumentEntity[] |
getDocumentTanslations()
Returns all the existing translation of a SimpleDocument. |
javax.ws.rs.core.Response |
getFileContent(String language)
Returns the content of the specified document in the specified language. |
String |
getSimpleDocumentId()
|
String |
lock(String language)
Locks the specified document for exclusive edition. |
String |
moveSimpleDocumentDown()
Moves the specified document down in the list. |
String |
moveSimpleDocumentUp()
Moves the specified document up in the list. |
String |
switchDocumentVersionState(String comment,
String version)
Changes the document version state. |
String |
switchDownloadAllowedForReaders(boolean allowed)
Forbid or allow the download of the document for readers. |
String |
unlockDocument(boolean force,
boolean webdav,
boolean privateVersion,
String comment)
Unlocks the specified document for exclusive edition. |
javax.ws.rs.core.Response |
updateDocument(String filename)
Updates the document identified by the requested URI. |
protected SimpleDocumentEntity |
updateSimpleDocument(SimpleDocumentUploadData uploadData,
String filename)
|
void |
validateUserAuthorization(UserPriviledgeValidation validation)
Validates the authorization of the user to request this web service. |
Methods inherited from class org.silverpeas.attachment.web.AbstractSimpleDocumentResource |
---|
checkUploadedFile, getBundleLocation, getComponentId, performRuntimeException |
Methods inherited from class com.silverpeas.web.RESTWebService |
---|
getBundle, getGreaterUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getUriInfo, getUserDetail, getUserPreferences, getUserRoles, process, validateUserAuthentication |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleDocumentResource()
Method Detail |
---|
public String getSimpleDocumentId()
public SimpleDocumentEntity getDocument(String lang)
lang
- the wanted language.
public void deleteDocument()
public void deleteContent(String lang)
lang
- the lang of the content to be deleted.public javax.ws.rs.core.Response updateDocument(String filename) throws IOException
SimpleDocumentUploadData
is extracted from request parameters.
xRequestedWith
parameter).
IOException
- if an error occurs while updating the document.protected SimpleDocumentEntity updateSimpleDocument(SimpleDocumentUploadData uploadData, String filename) throws IOException
IOException
public SimpleDocumentEntity[] getDocumentTanslations()
public void validateUserAuthorization(UserPriviledgeValidation validation) throws javax.ws.rs.WebApplicationException
validateUserAuthorization
in class RESTWebService
validation
- the validation instance to use.
javax.ws.rs.WebApplicationException
- if the rights of the user are not enough to access this web
resource.UserPriviledgeValidation
public javax.ws.rs.core.Response getFileContent(String language)
language
- the language of the document's content to get.
public String lock(String language)
public String moveSimpleDocumentUp()
public String moveSimpleDocumentDown()
public String unlockDocument(boolean force, boolean webdav, boolean privateVersion, String comment)
force
- if the unlocking has to be forced.webdav
- if the unlock is performed while a WebDAV access.privateVersion
- if the document is a private version.comment
- a comment about the unlock.
public String switchDocumentVersionState(String comment, String version)
comment
- comment about the version state switching.version
- the new version state.
public String switchDownloadAllowedForReaders(boolean allowed)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |