Package com.dotmarketing.business

Examples of com.dotmarketing.business.DotStateException


      Logger.debug(this.getClass(), "------------------------------------------------------------------");
      Logger.debug(this.getClass(), "");

      return ret.toString();
    } catch (NoSuchAlgorithmException e) {
      throw new DotStateException(this.getClass() + ":" + e);
    }

  }
View Full Code Here


  }



  protected void save(WebAsset file) throws DotDataException {
    throw new DotStateException("This method is not applicable for Files, use saveFile");
  }
View Full Code Here

  }

  protected void saveFileData(File file, File destination, java.io.File newDataFile) throws DotDataException, IOException {
   
    if(!isLegacyFilesSupported()){
      throw new DotStateException("File Assets have been disabled.");
    }

    String fileName = file.getFileName();

    String assetsPath = getRealAssetsRootPath();
View Full Code Here

  protected File saveFile(File newFile, java.io.File dataFile, Folder folder, Identifier identifier, User user,
      boolean respectFrontendRoles) throws DotDataException, DotSecurityException, IOException {
   
    if(!isLegacyFilesSupported()){
      throw new DotStateException("File Assets have been disabled.");
    }

    if (!permissionAPI.doesUserHavePermission(folder, PermissionAPI.PERMISSION_WRITE, user, respectFrontendRoles)) {
      throw new DotSecurityException("You don't have permission to write in the destination folder.");
    }
View Full Code Here

    }

    public File copyFile ( File file, Host host, Folder parent, User user, boolean respectFrontendRoles ) throws IOException, DotSecurityException, DotDataException {

        if ( !isLegacyFilesSupported() ) {
            throw new DotStateException( "File Assets have been disabled." );
        }

        if ( !permissionAPI.doesUserHavePermission( file, PermissionAPI.PERMISSION_READ, user, respectFrontendRoles ) ) {
            throw new DotSecurityException( WebKeys.USER_PERMISSIONS_EXCEPTION );
        } else if ( parent != null && !permissionAPI.doesUserHavePermission( parent, PermissionAPI.PERMISSION_CAN_ADD_CHILDREN, user, respectFrontendRoles ) ) {
View Full Code Here

    }

  public boolean renameFile(File file, String newName, User user, boolean respectFrontendRoles) throws DotStateException,
      DotDataException, DotSecurityException {
    if(!isLegacyFilesSupported()){
      throw new DotStateException("File Assets have been disabled.");
    }
   
    if (!permissionAPI.doesUserHavePermission(file, PermissionAPI.PERMISSION_WRITE, user, respectFrontendRoles)) {
      throw new DotSecurityException(WebKeys.USER_PERMISSIONS_EXCEPTION);
    }
View Full Code Here

    }

  public boolean moveFile(File file, Folder parent, Host host, User user, boolean respectFrontendRoles) throws DotStateException, DotDataException, DotSecurityException {

    if(!isLegacyFilesSupported()){
      throw new DotStateException("File Assets have been disabled.");
    }

        if ( !permissionAPI.doesUserHavePermission( file, PermissionAPI.PERMISSION_READ, user, respectFrontendRoles ) ) {
            throw new DotSecurityException( WebKeys.USER_PERMISSIONS_EXCEPTION );
        } else if ( parent != null && !permissionAPI.doesUserHavePermission( parent, PermissionAPI.PERMISSION_CAN_ADD_CHILDREN, user, respectFrontendRoles ) ) {
View Full Code Here

  public void publishFile(File file, User user, boolean respectFrontendRoles) throws WebAssetException, DotSecurityException,
      DotDataException {
   
    if(!isLegacyFilesSupported()){
      throw new DotStateException("File Assets have been disabled.");
    }
   
    if (!permissionAPI.doesUserHavePermission(file, PermissionAPI.PERMISSION_READ, user, respectFrontendRoles)) {
      throw new DotSecurityException(WebKeys.USER_PERMISSIONS_EXCEPTION);
    }
View Full Code Here

   
  }

  public void save(Template template) throws DotDataException {
    if(!UtilMethods.isSet(template.getIdentifier())){
      throw new DotStateException("Cannot save a template without an Identifier");
    }
    HibernateUtil.save(template);
   
    TemplateServices.invalidate(template, true);
View Full Code Here

  }
 
  public void save(Template template, String existingId) throws DotDataException {
        if(!UtilMethods.isSet(template.getIdentifier())){
            throw new DotStateException("Cannot save a tempalte without an Identifier");
        }
        HibernateUtil.saveWithPrimaryKey(template, existingId);
        templateCache.add(template.getInode(), template);
        TemplateServices.invalidate(template, true);
View Full Code Here

TOP

Related Classes of com.dotmarketing.business.DotStateException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.