Package org.jboss.profileservice.spi

Examples of org.jboss.profileservice.spi.ProfileKey


            return;
         }
         try
         {
            // Register
            final ProfileKey key = profileService.registerProfile(createProfileMetaData(deploymentURI));
            profiles.put(deploymentURI, key);
            // Activate
            profileService.activateProfile(key);
            profileService.validateProfile(key);
         }
View Full Code Here


    */
   public void removeURI(URI deploymentURI)
   {
      synchronized(profiles)
      {
         final ProfileKey key = profiles.remove(deploymentURI);
         if(key != null)
         {
            try
            {
               profileService.deactivateProfile(key);
View Full Code Here

      }
   }
  
   public void testSerializationDeserialization() throws Exception
   {
      ProfileKey key = new ProfileKey("domain", "server", "name");
      RepositoryContentMetadata rcm = new RepositoryContentMetadata(key);
      RepositoryRootMetadata rrm = new RepositoryRootMetadata("normal");
      Collection<RepositoryItemMetadata> rims = rrm.getContent();
     
      RepositoryItemMetadata rim = new RepositoryItemMetadata();
View Full Code Here

      return localNode == null ? null : localNode.getName();
   }

   public ProfileKey getProfileKey()
   {
      return new ProfileKey(profileDomain, profileServer, profileName);
   }
View Full Code Here

   protected ProfileKey getProfileKey()
   {
      if(getProfileName() == null)
         return farmProfile;
     
      return new ProfileKey(getProfileName());
   }
View Full Code Here

      return md.getAttachment(ProfileKey.class);
   }

   private Profile getProfileForDeployment(String name) throws Exception
   {
      ProfileKey key = getProfileKeyForDeployemnt(name);
      if(key == null)
         throw new NoSuchDeploymentException("No associated profile found for deployment:" + name);

      return this.ps.getActiveProfile(key);
   }
View Full Code Here

      return md.getAttachment(ProfileKey.class);
   }
  
   private Profile getProfileForDeployment(String name) throws Exception
   {
      ProfileKey key = getProfileKeyForDeployemnt(name);
      if(key == null)
         throw new NoSuchDeploymentException("No associated profile found for deployment:" + name);
     
      return this.ps.getActiveProfile(key);
   }
View Full Code Here

    * @return the deployment repository
    * @throws NoSuchProfileException if the deployment repository does not exist
    */
   protected DeploymentRepository getDeploymentRepository(DeploymentID dtID) throws Exception
   {
      ProfileKey key = dtID.getProfile();
      if(key == null)
         throw new IllegalStateException("No profile key attached to deploymentID "+ dtID);
     
      return this.profileRepository.getProfileDeploymentRepository(key);
   }
View Full Code Here

    {
        ProfileService profileService = getProfileService();
        ManagementView currentProfileView = profileService.getViewManager();
        String[] domains = profileService.getDomains();

        ProfileKey defaultKey = new ProfileKey(domains[0]);

        try
        {
            currentProfileView.loadProfile(defaultKey);
        }
View Full Code Here

     
      // A list of profile keys
      List<ProfileKey> keys = new ArrayList<ProfileKey>();
     
      // Parse
      Collection<Profile> profiles = profileFactory.createProfiles(new ProfileKey("default"), null);
      for(Profile profile : profiles)
      {
         // Register
         profileService.registerProfile(profile);
         ProfileKey key = profile.getKey();
         keys.add(key);
         try
         {
            // This is the default behavior. For custom profiles this could be different
            profileService.getActiveProfile(key);
            fail("profile already registered  "+ key);
         }
         catch(NoSuchProfileException e)
         {
            // ok
         }
      }
     
      // All profiles should be registered now
      for(ProfileKey key : keys)
         profileService.getProfile(key);
     
      try
      {
         // Activate profile
         ProfileKey key = new ProfileKey("default");
         profileService.activateProfile(key);
         profileService.validateProfile(key);
      }
      catch(Exception e)
      {
         getLog().error("failed to activate: ", e);
         throw e;
      }

      // Test the default profile
      Profile active = profileService.getActiveProfile(new ProfileKey("default"));
      assertNotNull(active);
     
      // All profiles should be active now
      for(ProfileKey key : keys)
         profileService.getActiveProfile(key);
View Full Code Here

TOP

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

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.