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
  • 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:
      addPlugin in interface org.exoplatform.social.attachment.AttachmentService
    • getSupportedObjectTypes

      public Set<String> getSupportedObjectTypes()
      Specified by:
      getSupportedObjectTypes in interface org.exoplatform.social.attachment.AttachmentService
    • getAttachmentPlugins

      public Map<String,org.exoplatform.social.attachment.AttachmentPlugin> getAttachmentPlugins()
      Specified by:
      getAttachmentPlugins in interface org.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:
      saveAttachments in interface org.exoplatform.social.attachment.AttachmentService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • saveAttachments

      public org.exoplatform.social.attachment.model.ObjectAttachmentOperationReport saveAttachments(org.exoplatform.social.attachment.model.FileAttachmentResourceList attachmentList)
      Specified by:
      saveAttachments in interface org.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.commons.ObjectAlreadyExistsException, org.exoplatform.commons.exception.ObjectNotFoundException
      Specified by:
      saveAttachment in interface org.exoplatform.social.attachment.AttachmentService
      Throws:
      IOException
      org.exoplatform.commons.ObjectAlreadyExistsException
      org.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:
      createAttachment in interface org.exoplatform.social.attachment.AttachmentService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • deleteAttachments

      public void deleteAttachments(String objectType, String objectId)
      Specified by:
      deleteAttachments in interface org.exoplatform.social.attachment.AttachmentService
    • deleteAttachment

      public void deleteAttachment(String objectType, String objectId, String fileId)
      Specified by:
      deleteAttachment in interface org.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:
      getAttachments in interface org.exoplatform.social.attachment.AttachmentService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • 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:
      getAttachments in interface org.exoplatform.social.attachment.AttachmentService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getAttachmentFileIds

      public List<String> getAttachmentFileIds(String objectType, String objectId, org.exoplatform.services.security.Identity userAclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Specified by:
      getAttachmentFileIds in interface org.exoplatform.social.attachment.AttachmentService
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • getAttachmentFileIds

      public List<String> getAttachmentFileIds(String objectType, String objectId)
      Specified by:
      getAttachmentFileIds in interface org.exoplatform.social.attachment.AttachmentService
    • getAttachments

      public org.exoplatform.social.attachment.model.ObjectAttachmentList getAttachments(String objectType, String objectId)
      Specified by:
      getAttachments in interface org.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:
      getAttachment in interface org.exoplatform.social.attachment.AttachmentService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getAttachment

      public org.exoplatform.social.attachment.model.ObjectAttachmentDetail getAttachment(String objectType, String objectId, String fileId)
      Specified by:
      getAttachment in interface org.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:
      getAttachmentInputStream in interface org.exoplatform.social.attachment.AttachmentService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
      IOException
    • hasAccessPermission

      public boolean hasAccessPermission(org.exoplatform.services.security.Identity userIdentity, String objectType, String objectId) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Specified by:
      hasAccessPermission in interface org.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:
      hasEditPermission in interface org.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:
      moveAttachments in interface org.exoplatform.social.attachment.AttachmentService
    • copyAttachments

      public void copyAttachments(String sourceObjectType, String sourceObjectId, String destinationObjectType, String destinationObjectId, String destinationParentObjectId, long userIdentityId)
      Specified by:
      copyAttachments in interface org.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.commons.ObjectAlreadyExistsException
      Specified by:
      createAttachment in interface org.exoplatform.social.attachment.AttachmentService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      org.exoplatform.commons.ObjectAlreadyExistsException