Class AddEntityDocChange

java.lang.Object
ch.tocco.nice2.dms.impl.dbrefactoring.AddEntityDocChange
All Implemented Interfaces:
liquibase.change.custom.CustomChange, liquibase.change.custom.CustomTaskChange

public class AddEntityDocChange extends Object implements liquibase.change.custom.CustomTaskChange
Used to upload binaries and attach them as entitydocs Parameters: * publishStatus PublishStatus to be used * fileName Filename of the to-be-attached file. Relative to project root * entityModel Name of the respective EntityModel * uniqueId unique_id of the respective Entity * binaryFieldName Optional. Field name to which the binary shall be bound * resourceName. Name of the resource * businessUnitId. uniqueId of the business unit * businessUnitPath. path to the business unit (default = "relBusiness_unit")
  • Constructor Details Link icon

  • Method Details Link icon

    • execute Link icon

      public void execute(liquibase.database.Database database) throws liquibase.exception.CustomChangeException
      Specified by:
      execute in interface liquibase.change.custom.CustomTaskChange
      Throws:
      liquibase.exception.CustomChangeException
    • getConfirmationMessage Link icon

      public String getConfirmationMessage()
      Specified by:
      getConfirmationMessage in interface liquibase.change.custom.CustomChange
    • setUp Link icon

      public void setUp() throws liquibase.exception.SetupException
      Specified by:
      setUp in interface liquibase.change.custom.CustomChange
      Throws:
      liquibase.exception.SetupException
    • setFileOpener Link icon

      public void setFileOpener(liquibase.resource.ResourceAccessor resourceAccessor)
      Specified by:
      setFileOpener in interface liquibase.change.custom.CustomChange
    • validate Link icon

      public liquibase.exception.ValidationErrors validate(liquibase.database.Database database)
      Specified by:
      validate in interface liquibase.change.custom.CustomChange
    • getEntities Link icon

      public EntityList getEntities() throws PersistException, liquibase.exception.CustomChangeException
      Throws:
      PersistException
      liquibase.exception.CustomChangeException
    • linkBinaryToEntity Link icon

      public void linkBinaryToEntity(Entity entity, InputStream inputStream, FolderNode entityDocFolder) throws IOException, PersistException, InterruptedException
      Throws:
      IOException
      PersistException
      InterruptedException
    • getOrCreateEntityDocFolder Link icon

      public FolderNode getOrCreateEntityDocFolder(Entity entity, String entityModel) throws PersistException
      Throws:
      PersistException
    • hasEntityDocFolder Link icon

      public boolean hasEntityDocFolder(String modelName, Entity entity) throws PersistException
      Throws:
      PersistException
    • openFile Link icon

      public InputStream openFile(String uriString) throws IOException
      Throws:
      IOException
    • getResourceName Link icon

      public String getResourceName()
    • getBinaryFieldName Link icon

      public String getBinaryFieldName()
    • getEntityModel Link icon

      public String getEntityModel()
    • getUniqueId Link icon

      public String getUniqueId()
    • getFileName Link icon

      public String getFileName()
    • getPublishStatus Link icon

      public String getPublishStatus()
    • setFileName Link icon

      public void setFileName(String fileName)
    • setEntityModel Link icon

      public void setEntityModel(String entityModel)
    • setUniqueId Link icon

      public void setUniqueId(String uniqueId)
    • setBinaryFieldName Link icon

      public void setBinaryFieldName(String binaryFieldName)
    • setResourceName Link icon

      public void setResourceName(String resourceName)
    • setPublishStatus Link icon

      public void setPublishStatus(String publishStatus)
    • getBusinessUnitId Link icon

      public String getBusinessUnitId()
    • setBusinessUnitId Link icon

      public void setBusinessUnitId(String businessUnitId)
    • getBusinessUnitPath Link icon

      public String getBusinessUnitPath()
    • setBusinessUnitPath Link icon

      public void setBusinessUnitPath(String businessUnitPath)