[jboss-cvs] JBossAS SVN: r83412 - trunk/system/src/main/org/jboss/system/server/profileservice/repository.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 26 09:38:22 EST 2009
Author: emuckenhuber
Date: 2009-01-26 09:38:22 -0500 (Mon, 26 Jan 2009)
New Revision: 83412
Modified:
trunk/system/src/main/org/jboss/system/server/profileservice/repository/StaticProfileFactory.java
Log:
hotDeployment = true; and minor javadoc update
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/StaticProfileFactory.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/StaticProfileFactory.java 2009-01-26 14:34:58 UTC (rev 83411)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/StaticProfileFactory.java 2009-01-26 14:38:22 UTC (rev 83412)
@@ -38,7 +38,9 @@
import org.jboss.system.server.profile.repository.metadata.ImmutableProfileSourceMetaData;
/**
- * A profile factory based on a static configuration.
+ * A profile factory based on a static configuration.
+ * This creates the legacy configuration: bootstrap, deployers, and the
+ * root profile.
*
* @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -104,16 +106,34 @@
this.applicationURIs = applicationURIs;
}
+ /**
+ * The template root is used by the ManagementView and points
+ * to the first applicationURI - by default the deploy/ directory.
+ *
+ * @return the template root.
+ */
public URI getTemplateRoot()
{
- // Used for the management view
+ if(this.applicationURIs.size() == 0)
+ throw new IllegalStateException("No application uris defined.");
return this.applicationURIs.get(0);
}
+
+ public void create() throws Exception
+ {
+ // Sanity checks
+ if(this.bootstrapURI == null)
+ throw new IllegalStateException("Null bootstrap uri.");
+ if(this.deployersURI == null)
+ throw new IllegalStateException("Null deployers uri.");
+ if(this.applicationURIs == null)
+ throw new IllegalStateException("Null application uris.");
+ }
/**
* Create the legacy profiles, based on the injected uris.
*
- * @param server The Server.
+ * @param rootKey the key for the root profile.
* @throws Exception
*/
@Override
@@ -138,7 +158,7 @@
URI[] rootURIs = applicationURIs.toArray(new URI[applicationURIs.size()]);
String[] rootSubProfiles = new String[] { BOOTSTRAP_NAME, DEPLOYERS_NAME };
ProfileMetaData root = createProfileMetaData(
- rootKey.getName(), false, rootURIs, rootSubProfiles);
+ rootKey.getName(), true, rootURIs, rootSubProfiles);
// Add to profile map
addProfile(rootKey, root);
}
@@ -147,9 +167,10 @@
* Create a profile meta data.
*
* @param name the profile name.
- * @param repositoryType the repository type.
+ * @param hotDeployment if it's a hotDeployment profile
* @param uris the repository uris.
* @param subProfiles a list of profile dependencies.
+ *
* @return the profile meta data.
*/
protected ProfileMetaData createProfileMetaData(String name, boolean hotDeployment, URI[] uris, String[] subProfiles)
@@ -176,8 +197,9 @@
/**
* Create a profile repository source meta data.
*
- * @param type the repository type.
- * @param uri the uri
+ * @param uris the uris for the repository
+ * @param hotDeployment to create a hotDeployment profile
+ *
* @return the profile source meta data.
*/
protected ProfileSourceMetaData createSource(URI[] uris, boolean hotDeployment)
More information about the jboss-cvs-commits
mailing list