Examples of FileRepository


Examples of org.eclipse.jgit.storage.file.FileRepository

      }
      credentialsProvider = new UsernamePasswordCredentialsProvider(repoUsername, repoPassword.toCharArray());
    }

    // Initialize temp local file repo
    FileRepository localRepo = null;
    try {
      File f = new File(parentDirName + "/.git");
      localRepo = new FileRepository(f);
      if (log.isDebugEnabled()) {
        log.debug("Local File Repo: " + f.getAbsoluteFile());
      }
    } catch (IOException e) {
      throw new ADCException("Error creating local file repo", e);
View Full Code Here

Examples of org.eclipse.jgit.storage.file.FileRepository

    public static BuildNumber extract(File repoDirectory) throws IOException {
        if(!(repoDirectory.exists() && repoDirectory.isDirectory())) throw new IOException(
                "Invalid repository directory provided: " + repoDirectory.getAbsolutePath());
        // open repo, jgit has some problems with not canonical paths
        File canonicalRepo = repoDirectory.getCanonicalFile();
        FileRepository repo = new FileRepositoryBuilder().findGitDir(canonicalRepo).build();
        // extract HEAD revision
        ObjectId revisionObject = repo.resolve(Constants.HEAD);
        if (null == revisionObject) throw new IOException("Cannot read current revision from repository: " + repo);
        String revision = revisionObject.name();
        // extract current branch
        String branch = readCurrentBranch(repo, revision);
        // extract current tag
View Full Code Here

Examples of org.eclipse.jgit.storage.file.FileRepository

   *             the repository could not be accessed to configure the rest of
   *             the builder's parameters.
   */
  @SuppressWarnings("unchecked")
  public R build() throws IOException {
    return (R) new FileRepository(setup());
  }
View Full Code Here

Examples of org.eclipse.jgit.storage.file.FileRepository

    InternalLocalFetchConnection() throws TransportException {
      super(TransportLocal.this);

      final Repository dst;
      try {
        dst = new FileRepository(remoteGitDir);
      } catch (IOException err) {
        throw new TransportException(uri, JGitText.get().notAGitDirectory);
      }

      final PipedInputStream in_r;
View Full Code Here

Examples of org.eclipse.jgit.storage.file.FileRepository

    InternalLocalPushConnection() throws TransportException {
      super(TransportLocal.this);

      final Repository dst;
      try {
        dst = new FileRepository(remoteGitDir);
      } catch (IOException err) {
        throw new TransportException(uri, JGitText.get().notAGitDirectory);
      }

      final PipedInputStream in_r;
View Full Code Here

Examples of org.internna.iwebmvc.repository.FileRepository

            @Override
            protected EntityManager getEntityManager() {
                return UploadMonitorImplTest.entityManager;
            }
        };
        FileRepository repository = new FileRepository();
        repository.setDocumentRoot(root);
        monitor.documentRepository = repository;
        File upload = new File("web/images/i18n/globe.gif");
        FileInputStream stream = new FileInputStream(upload);
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        FileCopyUtils.copy(stream, out);
View Full Code Here

Examples of org.internna.iwebmvc.repository.FileRepository

    public void setup() throws Exception {
        controller = new RemoteRepositoryAccessController();
        crypto = new DES3CiphererDecipherer();
        crypto.init();
        controller.decipherer = crypto;
        FileRepository repository = new FileRepository();
        repository.setDocumentRoot(root);
        controller.documentRepository = repository;
        DocumentHolder doc = new DocumentHolder();
        doc.setIdentifier("web/images/i18n/globe.gif");
        doc.setStream(new FileInputStream(new File(doc.getIdentifier())));
        doc.setMimeType("image/jpg");
        repository.store(doc);
        uri = crypto.encrypt(doc.getUri());
    }
View Full Code Here

Examples of org.jboss.as.domain.controller.FileRepository

    }

    private void addDeployments(List<ModelNode> updates) {
        if (serverGroup.hasDefined(DEPLOYMENT)) {

            FileRepository remoteRepository = null;
            if (! domainController.getLocalHostInfo().isMasterDomainController()) {
                remoteRepository = domainController.getRemoteFileRepository();
            }

            for (Property deployment : serverGroup.get(DEPLOYMENT).asPropertyList()) {
                String name = deployment.getName();
                ModelNode details = deployment.getValue();

                ModelNode domainDeployment = domainModel.require(DEPLOYMENT).require(name);
                ModelNode deploymentContent = domainDeployment.require(CONTENT).clone();

                if (remoteRepository != null) {
                    // Make sure we have a copy of the deployment in the local repo
                    for (ModelNode content : deploymentContent.asList()) {
                        if ((content.hasDefined(HASH))) {
                            byte[] hash = content.require(HASH).asBytes();
                            File[] files = domainController.getLocalFileRepository().getDeploymentFiles(hash);
                            if (files == null || files.length == 0) {
                                remoteRepository.getDeploymentFiles(hash);
                            }
                        }
                    }
                }
View Full Code Here

Examples of org.jboss.as.domain.controller.FileRepository

            filePath = input.readUTF();
        }

        @Override
        protected void processRequest() throws RequestProcessingException {
            final FileRepository localFileRepository = domainController.getLocalFileRepository();

            switch (rootId) {
                case DomainControllerProtocol.PARAM_ROOT_ID_FILE: {
                    localPath = localFileRepository.getFile(filePath);
                    break;
                }
                case DomainControllerProtocol.PARAM_ROOT_ID_CONFIGURATION: {
                    localPath = localFileRepository.getConfigurationFile(filePath);
                    break;
                }
                case DomainControllerProtocol.PARAM_ROOT_ID_DEPLOYMENT: {
                    byte[] hash = HashUtil.hexStringToByteArray(filePath);
                    localPath = localFileRepository.getDeploymentRoot(hash);
                    break;
                }
                default: {
                    throw new RequestProcessingException(String.format("Invalid root id [%d]", rootId));
                }
View Full Code Here

Examples of org.jfree.repository.file.FileRepository

   */
  public void run()
  {
    try
    {
      final FileRepository targetRepository = new FileRepository(targetDirectory);
      final ContentLocation targetRoot = targetRepository.getRoot();

      final FileRepository dataRepository = new FileRepository(dataDirectory);
      final ContentLocation dataRoot = dataRepository.getRoot();

      final StreamingReportProcessor sp = new StreamingReportProcessor();
      final HtmlOutputProcessor outputProcessor = createOutputProcessor();
      final HtmlPrinter printer = outputProcessor.getPrinter();
      printer.setContentWriter(targetRoot,
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.