Examples of saveFile()


Examples of org.asem.eclipse.mii.db.DBFiles.saveFile()

            if (!files.checkPreferences()) {
                System.err.println("Check Preferences for project: " + prj.getName() + " failed!!! File: " + res.getName() + " skipped.");
                continue;
            }

            files.saveFile(res);
            projects.add(Config.getValue(p, DBConsts.MII_PROJECT, ""));
        }

        /*
         * Update all root catalog of MII project
View Full Code Here

Examples of org.mifosplatform.infrastructure.documentmanagement.contentrepository.ContentRepository.saveFile()

            validator.validateForCreate();

            final ContentRepository contentRepository = this.contentRepositoryFactory.getRepository();

            final String fileLocation = contentRepository.saveFile(inputStream, documentCommand);

            final Document document = Document.createNew(documentCommand.getParentEntityType(), documentCommand.getParentEntityId(),
                    documentCommand.getName(), documentCommand.getFileName(), documentCommand.getSize(), documentCommand.getType(),
                    documentCommand.getDescription(), fileLocation, contentRepository.getStorageType());
View Full Code Here

Examples of org.mifosplatform.infrastructure.documentmanagement.contentrepository.ContentRepository.saveFile()

            final StorageType documentStoreType = documentForUpdate.storageType();
            oldLocation = documentForUpdate.getLocation();
            if (inputStream != null && documentCommand.isFileNameChanged()) {
                final ContentRepository contentRepository = this.contentRepositoryFactory.getRepository();
                documentCommand.setLocation(contentRepository.saveFile(inputStream, documentCommand));
                documentCommand.setStorageType(contentRepository.getStorageType().getValue());
            }

            documentForUpdate.update(documentCommand);
View Full Code Here

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

    }

    structure = addDashboardStyleAndRendererTypeToTemplate( structure );

    byte[] fileData = structure.getBytes( CharsetHelper.getEncoding() );
    if ( !access.saveFile( Utils.joinPath( REPOSITORY_CDF_DD_TEMPLATES_CUSTOM, file ), new ByteArrayInputStream(
        fileData ) ) ) {
      throw new DashboardStructureException( Messages
          .getString( "DashboardStructure.ERROR_006_SAVE_FILE_ADD_FAIL_EXCEPTION" ) );
    }
  }
View Full Code Here

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

    // and generate a fake global message file. So this way we're sure that we always have the file
    String localizedMsgGlobalName = BASE_GLOBAL_MESSAGE_SET_FILENAME + "_" + locale.getLanguage() + ".properties";

    if ( userContentAccess.fileExists( localizedMsgGlobalName ) ) {

      systemWriter.saveFile( localizedMsgGlobalName, userContentAccess.getFileInputStream( localizedMsgGlobalName ) );

    } else if ( globalBaseMessageFile != null ) {

      systemWriter.saveFile( localizedMsgGlobalName, globalBaseMessageFile.getContents() );
    }
View Full Code Here

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

      systemWriter.saveFile( localizedMsgGlobalName, userContentAccess.getFileInputStream( localizedMsgGlobalName ) );

    } else if ( globalBaseMessageFile != null ) {

      systemWriter.saveFile( localizedMsgGlobalName, globalBaseMessageFile.getContents() );
    }

    // Append specific message file only if it exists otherwise just use the global message files
    if ( sourceDashboardBaseMsgFile != null ) {
View Full Code Here

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

    }

    // Append specific message file only if it exists otherwise just use the global message files
    if ( sourceDashboardBaseMsgFile != null ) {

      systemWriter.saveFile( sourceDashboardBaseMsgFile.getName(), sourceDashboardBaseMsgFile.getContents() );

      String localizedMsgTargetName =
          FilenameUtils.getBaseName( sourceDashboardBaseMsgFile.getName() ) + "_" + locale.getLanguage()
              + ".properties";
View Full Code Here

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

          FilenameUtils.getBaseName( sourceDashboardBaseMsgFile.getName() ) + "_" + locale.getLanguage()
              + ".properties";

      if ( userContentAccess.fileExists( localizedMsgTargetName ) ) {

        systemWriter.saveFile( localizedMsgTargetName, userContentAccess.getFileInputStream( localizedMsgTargetName ) );
      }
    }
  }

  protected void copyStdGlobalMessageFileToCache() throws IOException {
View Full Code Here

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

    }

    // 3. CDE


    if ( !access.saveFile( cdeFilePath, new ByteArrayInputStream( safeGetEncodedBytes( cdfdeJsText ) ) ) ) {
      throw new DashboardStructureException(
        Messages.getString( "DashboardStructure.ERROR_006_SAVE_FILE_ADD_FAIL_EXCEPTION" ) );
    }

    // 3. CDA
View Full Code Here

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
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.