Package org.jboss.profileservice.spi

Examples of org.jboss.profileservice.spi.Profile


         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


               "clustering-runtime"});
   }
  
   protected void assertProfile(String name, int dependencySize, String[] dependencyNames)
   {
      Profile profile = profileMap.get(name);
      assertNotNull("Null profile: " + name, profile);
      assertNotNull("Null dependencies for profile: " + name, profile.getSubProfiles());
      assertDependenciesSize(dependencySize, profile);
      assertDependencies(dependencyNames, profile.getSubProfiles());
   }
View Full Code Here

      if (activeProfiles != null && activeProfiles.isEmpty() == false)
      {
         for (ProfileKey key : activeProfiles)
         {
            // The profile
            Profile profile;
            try
            {
               profile = ps.getActiveProfile(key);
            }
            catch (NoSuchProfileException ignore)
            {
               continue;
            }
            Collection<ProfileDeployment> deployments = profile.getDeployments();
            if (deployments != null && deployments.isEmpty() == false)
            {
               for (ProfileDeployment pd : deployments)
               {
                  VirtualFile root = pd.getRoot();
View Full Code Here

    * @param context the profile context.
    * @throws Exception
    */
   public void install(ProfileContext context) throws Exception
   {
      Profile profile = context.getProfile();
      if(profile == null)
         return;
     
      // Install
      install(profile);
View Full Code Here

    *
    * @param context the profile context.
    */
   public void uninstall(ProfileContext context)
   {
      Profile profile = context.getProfile();
      if(profile == null)
         return;
   
      try
      {
View Full Code Here

      // First recursively process the sub profiles
      processSubProfiles(profiles, subProfiles, profileMetaData.getSubprofiles());
     
      // Create the profile
      // Provide a new copy of the keys
      Profile profile = profileFactory.createProfile(key, profileMetaData, new ArrayList<ProfileKey>(subProfiles));
     
      // Add to the profileMap
      profiles.put(key, profile);
     
      // FIXME add a implicit dependency for the next
View Full Code Here

      return domains.toArray(new String[domains.size()]);
   }
  
   public String[] getProfileDeploymentNames(ProfileKey key) throws NoSuchProfileException
   {
      Profile profile = getActiveProfile(key);
      Collection<String> deploymentNames = profile.getDeploymentNames();
      return deploymentNames.toArray(new String[deploymentNames.size()]);
   }
View Full Code Here

      // Disable hotdeployment scanning
      for(ProfileKey key : profileService.getActiveProfileKeys())
      {
         try
         {
            Profile profile = profileService.getActiveProfile(key);
            if(profile.isMutable() && profile instanceof MutableProfile)
               ((MutableProfile) profile).enableModifiedDeploymentChecks(false);
         }
         catch(NoSuchProfileException ignore) { }
      }
     
     
      // Deactivate the root profile
      try
      {
         // Release
         profileService.deactivateProfile(profileKey);
      }
      catch(Throwable t)
      {
         log.warn("Error deactivating profile: " + this.profileKey, t);
      }
      try
      {
         // Unregister
         Profile profile = profileService.getProfile(profileKey);
         profileService.unregisterProfile(profileKey);
      }
      catch(Throwable t)
      {
         log.warn("Error unregistering profile: " + this.profileKey, t);        
View Full Code Here

      }

      VFSDeployment deployment = null;
      try
      {
         Profile profile = profileService.getProfile(profileKey);
         deployment = add(profile, component);
      }
      catch (Exception e)
      {
         log.debug("Failed to deploy: " + component, e);
View Full Code Here

         if (log.isTraceEnabled())
         {
            log.trace("Undeploying: " + component);
         }
         String name = deployedSet.remove(component);
         Profile profile = profileService.getProfile(profileKey);
         remove(profile, name);
      }
      catch (Exception e)
      {
         log.error("Failed to undeploy: " + component, e);
View Full Code Here

TOP

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

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.