@Security public class DocumentServiceSecurity extends CRUDServiceSecurity<DocumentDTO,Document,DocumentData,DocumentDataParams> implements DocumentService
DocumentServiceentityClass| Constructor and Description |
|---|
DocumentServiceSecurity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPerformOperation(Document entity,
CRUDOperation operation)
Returns whether the logged user can perform the given operation over the given entity
|
protected void |
checkCreateNew(DocumentDataParams params)
Checks whether creating new entities with the given context parameters is allowed, throwing
PermissionDeniedException if not |
boolean |
doHasManageAccess(Document document)
Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given
operation
|
boolean |
doHasViewAccess(Document document)
Should be implemented in order to return whether the caller is allowed to view the given entity.
|
DocumentVO |
getDocument(DocumentVO documentVO)
Used to get the view only object of the document
|
DocumentFileVO |
getDocumentFile(DocumentVO documentVO)
Return the file vo for a given document
|
DocumentSearchData |
getDocumentSearchData(DocumentQuery query)
Returns data used to search documents
|
protected DocumentServiceLocal |
getImplementation()
Should be implemented in order to return the actual implementation of the service
|
ProcessDynamicDocumentData |
getProcessDynamicDocumentData(DocumentVO documentVO,
UserLocatorVO locator)
Returns data used to fill a dynamic document based on the given user locator data
|
boolean |
isAccessible(SessionData sessionData,
Document entity)
Must be implemented in order to determine whether the given entity is accessible for the given session data.
|
java.util.List<DocumentVO> |
listMyDocuments()
List all Documents filtered by user
|
java.lang.String |
processDynamicDocument(ProcessDynamicDocumentDTO params)
Processes the given document using the given user and custom field values
|
SerializableInputStream |
readContent(DocumentVO documentVO)
Reads the contents of the document
|
void |
saveFile(DocumentVO documentVO,
java.lang.String contentType,
java.lang.String fileName,
SerializableInputStream contents)
Saves the given document, returning the generated identifier
|
Page<DocumentVO> |
search(DocumentQuery query)
List all documents filtered by category
|
canViewHistoryLog, checkManageAccess, checkOperation, checkViewAccess, customizeData, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, onBeforeSave, remove, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveEntityCheck, save, saveWithConfirmationPasswordcheckGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initializecanManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getAccountHandler, getAuthHandler, getBaseEntityManagerHandler, getChannelConfiguration, getConfiguration, getConversionHandler, getCustomFieldValueHandler, getEntityManagerHandler, getGroupsHandler, getLoggedBasicUser, getLoggedUser, getProducts, getProductsHandler, getReportHandler, getTranslatedName, getTranslatedValue, getUserLocatorHandler, getValidationResult, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, toDate, toDateTime, validatedelete, detach, find, flush, from, getApplicationContext, getConfigurationHandler, getDataTranslationHandler, getFormatter, getFormatter, getFormatter, getLogger, getNotificationHandler, getProfileFieldHandler, getRemoteAddress, getSessionData, getTransactionHandler, getTranslationHandler, message, message, persist, processBatch, refresh, remove, subQuery, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetData, getDataForNew, load, remove, removeAll, savepublic boolean canPerformOperation(Document entity, CRUDOperation operation)
CRUDServiceSecuritycanPerformOperation in class CRUDServiceSecurity<DocumentDTO,Document,DocumentData,DocumentDataParams>public boolean doHasManageAccess(Document document)
CRUDServiceSecuritydoHasManageAccess in class CRUDServiceSecurity<DocumentDTO,Document,DocumentData,DocumentDataParams>public boolean doHasViewAccess(Document document)
CRUDServiceSecuritydoHasViewAccess in class CRUDServiceSecurity<DocumentDTO,Document,DocumentData,DocumentDataParams>public DocumentVO getDocument(DocumentVO documentVO)
DocumentServicegetDocument in interface DocumentServicepublic DocumentFileVO getDocumentFile(DocumentVO documentVO)
DocumentServicegetDocumentFile in interface DocumentServicepublic DocumentSearchData getDocumentSearchData(DocumentQuery query) throws FrameworkException
DocumentServicegetDocumentSearchData in interface DocumentServiceFrameworkExceptionpublic ProcessDynamicDocumentData getProcessDynamicDocumentData(DocumentVO documentVO, UserLocatorVO locator)
DocumentServicegetProcessDynamicDocumentData in interface DocumentServicepublic boolean isAccessible(SessionData sessionData, Document entity)
CRUDServiceSecurityCRUDServiceSecurity.hasViewAccess(BaseEntity). If the only condition for an entity is
CRUDServiceSecurity.hasViewAccess(BaseEntity), this method
should return false.isAccessible in class CRUDServiceSecurity<DocumentDTO,Document,DocumentData,DocumentDataParams>public java.util.List<DocumentVO> listMyDocuments()
DocumentServicelistMyDocuments in interface DocumentServicepublic java.lang.String processDynamicDocument(ProcessDynamicDocumentDTO params) throws ValidationException
DocumentServiceprocessDynamicDocument in interface DocumentServiceValidationExceptionpublic SerializableInputStream readContent(DocumentVO documentVO) throws EntityNotFoundException
DocumentServicereadContent in interface DocumentServiceEntityNotFoundException - When the image is not foundpublic void saveFile(DocumentVO documentVO, java.lang.String contentType, java.lang.String fileName, SerializableInputStream contents)
DocumentServicesaveFile in interface DocumentServicepublic Page<DocumentVO> search(DocumentQuery query)
DocumentServicesearch in interface DocumentServiceprotected void checkCreateNew(DocumentDataParams params)
CRUDServiceSecurityPermissionDeniedException if notcheckCreateNew in class CRUDServiceSecurity<DocumentDTO,Document,DocumentData,DocumentDataParams>protected DocumentServiceLocal getImplementation()
CRUDServiceSecuritygetImplementation in class CRUDServiceSecurity<DocumentDTO,Document,DocumentData,DocumentDataParams>