Class AttachmentServiceImpl
java.lang.Object
org.exoplatform.social.core.attachment.AttachmentServiceImpl
- All Implemented Interfaces:
org.exoplatform.social.attachment.AttachmentService
public class AttachmentServiceImpl
extends Object
implements org.exoplatform.social.attachment.AttachmentService
-
Field Summary
Fields inherited from interface org.exoplatform.social.attachment.AttachmentService
ATTACHMENT_CREATED_EVENT, ATTACHMENT_DELETED_EVENT, ATTACHMENTS_DELETED_EVENT, ATTACHMENTS_UPDATED_EVENT, METADATA_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionAttachmentServiceImpl(FileAttachmentStorage attachmentStorage, org.exoplatform.social.metadata.MetadataService metadataService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.listener.ListenerService listenerService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlugin(org.exoplatform.social.attachment.AttachmentPlugin attachmentPlugin) voidcreateAttachment(String fileId, String objectType, String objectId, String parentObjectId, long userIdentityId, Map<String, String> properties) org.exoplatform.social.attachment.model.ObjectAttachmentDetailcreateAttachment(String objectType, String objectId, org.exoplatform.social.attachment.model.FileAttachmentObject attachmentObject, org.exoplatform.services.security.Identity userAclIdentity) voiddeleteAttachment(String objectType, String objectId, String fileId) voiddeleteAttachments(String objectType, String objectId) org.exoplatform.social.attachment.model.ObjectAttachmentDetailgetAttachment(String objectType, String objectId, String fileId) org.exoplatform.social.attachment.model.ObjectAttachmentDetailgetAttachment(String objectType, String objectId, String fileId, org.exoplatform.services.security.Identity userAclIdentity) getAttachmentFileIds(String objectType, String objectId) getAttachmentFileIds(String objectType, String objectId, org.exoplatform.services.security.Identity userAclIdentity) getAttachmentInputStream(String objectType, String objectId, String fileId, String imageDimensions, org.exoplatform.services.security.Identity userAclIdentity) org.exoplatform.social.attachment.model.ObjectAttachmentListgetAttachments(String objectType, String objectId) org.exoplatform.social.attachment.model.ObjectAttachmentListgetAttachments(String objectType, String objectId, org.exoplatform.services.security.Identity userAclIdentity) org.exoplatform.social.attachment.model.ObjectAttachmentListgetAttachments(String objectType, String objectId, org.exoplatform.services.security.Identity userAclIdentity, int offset, int limit) booleanhasAccessPermission(org.exoplatform.services.security.Identity userIdentity, String objectType, String objectId) booleanhasEditPermission(org.exoplatform.services.security.Identity userIdentity, String objectType, String objectId) voidmoveAttachments(String sourceObjectType, String sourceObjectId, String destinationObjectType, String destinationObjectId, String destinationParentObjectId, long userIdentityId) voidsaveAttachment(org.exoplatform.social.attachment.model.UploadedAttachmentDetail uploadedAttachmentDetail, String objectType, String objectId, String parentObjectId, long userIdentityId) org.exoplatform.social.attachment.model.ObjectAttachmentOperationReportsaveAttachments(org.exoplatform.social.attachment.model.FileAttachmentResourceList attachmentList) org.exoplatform.social.attachment.model.ObjectAttachmentOperationReportsaveAttachments(org.exoplatform.social.attachment.model.FileAttachmentResourceList attachmentList, org.exoplatform.services.security.Identity userAclIdentity)
-
Constructor Details
-
AttachmentServiceImpl
public AttachmentServiceImpl(FileAttachmentStorage attachmentStorage, org.exoplatform.social.metadata.MetadataService metadataService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.listener.ListenerService listenerService)
-
-
Method Details
-
addPlugin
public void addPlugin(org.exoplatform.social.attachment.AttachmentPlugin attachmentPlugin) - Specified by:
addPluginin interfaceorg.exoplatform.social.attachment.AttachmentService
-
getSupportedObjectTypes
- Specified by:
getSupportedObjectTypesin interfaceorg.exoplatform.social.attachment.AttachmentService
-
getAttachmentPlugins
- Specified by:
getAttachmentPluginsin interfaceorg.exoplatform.social.attachment.AttachmentService
-
saveAttachments
public org.exoplatform.social.attachment.model.ObjectAttachmentOperationReport saveAttachments(org.exoplatform.social.attachment.model.FileAttachmentResourceList attachmentList, org.exoplatform.services.security.Identity userAclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
saveAttachmentsin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
saveAttachments
public org.exoplatform.social.attachment.model.ObjectAttachmentOperationReport saveAttachments(org.exoplatform.social.attachment.model.FileAttachmentResourceList attachmentList) - Specified by:
saveAttachmentsin interfaceorg.exoplatform.social.attachment.AttachmentService
-
saveAttachment
public void saveAttachment(org.exoplatform.social.attachment.model.UploadedAttachmentDetail uploadedAttachmentDetail, String objectType, String objectId, String parentObjectId, long userIdentityId) throws IOException, org.exoplatform.social.common.ObjectAlreadyExistsException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
saveAttachmentin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
IOExceptionorg.exoplatform.social.common.ObjectAlreadyExistsExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
createAttachment
public org.exoplatform.social.attachment.model.ObjectAttachmentDetail createAttachment(String objectType, String objectId, org.exoplatform.social.attachment.model.FileAttachmentObject attachmentObject, org.exoplatform.services.security.Identity userAclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
createAttachmentin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
deleteAttachments
- Specified by:
deleteAttachmentsin interfaceorg.exoplatform.social.attachment.AttachmentService
-
deleteAttachment
- Specified by:
deleteAttachmentin interfaceorg.exoplatform.social.attachment.AttachmentService
-
getAttachments
public org.exoplatform.social.attachment.model.ObjectAttachmentList getAttachments(String objectType, String objectId, org.exoplatform.services.security.Identity userAclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
getAttachmentsin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getAttachments
public org.exoplatform.social.attachment.model.ObjectAttachmentList getAttachments(String objectType, String objectId, org.exoplatform.services.security.Identity userAclIdentity, int offset, int limit) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
getAttachmentsin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getAttachmentFileIds
public List<String> getAttachmentFileIds(String objectType, String objectId, org.exoplatform.services.security.Identity userAclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getAttachmentFileIdsin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getAttachmentFileIds
- Specified by:
getAttachmentFileIdsin interfaceorg.exoplatform.social.attachment.AttachmentService
-
getAttachments
public org.exoplatform.social.attachment.model.ObjectAttachmentList getAttachments(String objectType, String objectId) - Specified by:
getAttachmentsin interfaceorg.exoplatform.social.attachment.AttachmentService
-
getAttachment
public org.exoplatform.social.attachment.model.ObjectAttachmentDetail getAttachment(String objectType, String objectId, String fileId, org.exoplatform.services.security.Identity userAclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
getAttachmentin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getAttachment
public org.exoplatform.social.attachment.model.ObjectAttachmentDetail getAttachment(String objectType, String objectId, String fileId) - Specified by:
getAttachmentin interfaceorg.exoplatform.social.attachment.AttachmentService
-
getAttachmentInputStream
public InputStream getAttachmentInputStream(String objectType, String objectId, String fileId, String imageDimensions, org.exoplatform.services.security.Identity userAclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException, IOException - Specified by:
getAttachmentInputStreamin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessExceptionIOException
-
hasAccessPermission
public boolean hasAccessPermission(org.exoplatform.services.security.Identity userIdentity, String objectType, String objectId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
hasAccessPermissionin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
hasEditPermission
public boolean hasEditPermission(org.exoplatform.services.security.Identity userIdentity, String objectType, String objectId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
hasEditPermissionin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
moveAttachments
public void moveAttachments(String sourceObjectType, String sourceObjectId, String destinationObjectType, String destinationObjectId, String destinationParentObjectId, long userIdentityId) - Specified by:
moveAttachmentsin interfaceorg.exoplatform.social.attachment.AttachmentService
-
createAttachment
public void createAttachment(String fileId, String objectType, String objectId, String parentObjectId, long userIdentityId, Map<String, String> properties) throws org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.social.common.ObjectAlreadyExistsException- Specified by:
createAttachmentin interfaceorg.exoplatform.social.attachment.AttachmentService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionorg.exoplatform.social.common.ObjectAlreadyExistsException
-