Package pt.webdetails.cpf.repository.api

Examples of pt.webdetails.cpf.repository.api.IUserContentAccess.saveFile()


      }
      log.debug("Save repository file: " + file);

      IUserContentAccess access = contentAccessFactory.getUserContentAccess(null);

      boolean ok = access.saveFile(file, IOUtils.toInputStream(content));
      if (!ok) {
        throw new SaikuServiceException("Failed to write file: " + file);
      }
      return Response.ok().build();
    }
View Full Code Here


    IUserContentAccess access = CdeEnvironment.getUserContentAccess();

    if ( access.hasAccess( path, FileAccess.WRITE )
      || ( createNew && access.hasAccess( FilenameUtils.getFullPath( path ), FileAccess.WRITE ) ) ) {

      if ( access.saveFile( path, new ByteArrayInputStream( contents.getBytes( ENCODING ) ) ) ) {
        // saved ok
        writeOut( out, "file '" + path + "' saved ok" );
      } else {
        // error
        logger.error( "writeFile: failed saving " + path );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.