Package org.jboss.profileservice.spi

Examples of org.jboss.profileservice.spi.DeploymentRepository


      return TYPES;
   }
  
   public DelegateProfile createProfile(ProfileKey key, FarmingProfileMetaData metaData) throws Exception
   {
      DeploymentRepository repository = profileRepository.createProfileDeploymentRepository(key, metaData);
      return new DelegateProfile(repository, key);
   }
View Full Code Here


      return this.repositories.keySet();
   }

   public DeploymentRepository getProfileDeploymentRepository(ProfileKey key) throws NoSuchProfileException
   {
      DeploymentRepository repository = this.repositories.get(key);
      if(repository == null)
         throw new NoSuchProfileException("No such repository for profile: "  + key);
     
      return repository;
   }
View Full Code Here

      if(metaData == null)
         throw new IllegalArgumentException("Null metaData");
      if(metaData.getName() == null)
         throw new IllegalArgumentException("Null metaData name");
     
      DeploymentRepository repository = this.repositories.get(key);
      if(repository == null)
      {
         String type = null;
         if(metaData.getSource() == null)
            throw new IllegalStateException("No profile source.");
View Full Code Here

      return factory.createDeploymentRepository(key, metaData);
   }

   public void removeProfileDeploymentRepository(ProfileKey key) throws Exception, NoSuchProfileException
   {
      DeploymentRepository repository = this.repositories.remove(key);
      if(repository == null)
         throw new NoSuchProfileException("No such repository for profile: "  + key);
     
      // Remove
      repository.remove();
   }
View Full Code Here

   protected DeploymentAction<? extends DeploymentActionContext> createWoraroundDistributeAction(ProfileKey key,
         DeploymentID dtID, InputStream contentIS, MutableProfile profile) throws Exception
   {
      if(profileRepository.getProfileKeys().contains(key))
      {
         DeploymentRepository repository = profileRepository.getProfileDeploymentRepository(key);
         return new RepositoryDistributeAction(dtID, contentIS, profile, repository, null);
      }
      return null;
   }
View Full Code Here

   protected DeploymentAction<? extends DeploymentActionContext> createWoraroundRemoveAction(ProfileKey key,
         ManagedProfile profile, String name) throws Exception
   {
      if(profileRepository.getProfileKeys().contains(key))
      {
         DeploymentRepository repository = profileRepository.getProfileDeploymentRepository(key);
         return new RepositoryRemoveAction(key, repository, name, null);
      }
      return null;
   }
View Full Code Here

         try
         {
            if( parameter.equals("getRepositoryNames"))
            {
               String[] names = dtID.getNames();
               DeploymentRepository deploymentRepository = getDeploymentRepository(dtID);
               returnValue = getRepositoryNames(names, deploymentRepository);
            }
            else if( parameter.equals("distribute") )
            {
               returnValue = distribute(dtID);
View Full Code Here

    */
   public InvocationResponse handleStream(InputStream contentIS, InvocationRequest request) throws Throwable
   {
      // Get the deployment repository for this deploymentID
      SerializableDeploymentID deploymentTarget = (SerializableDeploymentID) request.getParameter();
      DeploymentRepository deploymentRepository = getDeploymentRepository(deploymentTarget);
      // Start to handle stream
      log.info("Handle stream, deploymentTarget: " + deploymentTarget);
      deploymentTarget.setContentIS(contentIS);
      String[] names = deploymentTarget.getNames();
     
      // Add deployment content to the repository
      String repositoryName = deploymentRepository.addDeploymentContent(names[0], contentIS,
            deploymentTarget.getDeploymentOptions());
     
      // FIXME make deployment visible to management view
      VirtualFile vf = deploymentRepository.getDeploymentContent(repositoryName);
      ProfileDeployment deployment = createDeployment(vf);
      deploymentRepository.addDeployment(deployment.getName(), deployment);
      deploymentRepository.lockDeploymentContent(deployment.getName());
     
      log.info("End handle stream, repositoryName: " + repositoryName);
      // Return the repository names
      String[] rnames = {repositoryName};
      deploymentTarget.setRepositoryNames(rnames);
View Full Code Here

    * @throws Exception for any error
    */
   protected void start(DeploymentID dtID) throws Exception
   {
      String[] names = dtID.getNames();
      DeploymentRepository deploymentRepository = getDeploymentRepository(dtID);
      log.info("Begin start, "+Arrays.asList(names));
     
      List<String> deployments = new ArrayList<String>();
      for(String name : names)
      {
View Full Code Here

    * @throws Exception for any error
    */
   protected void stop(DeploymentID dtID) throws Exception
   {
      String[] names = dtID.getNames();
      DeploymentRepository deploymentRepository = getDeploymentRepository(dtID);
      log.info("Stop, "+Arrays.asList(names));
     
      List<String> deployments = new ArrayList<String>();
      for(String name : names)
      {
View Full Code Here

TOP

Related Classes of org.jboss.profileservice.spi.DeploymentRepository

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.