[jboss-cvs] JBossAS SVN: r105720 - branches/JBPAPP_5_1/system/src/main/org/jboss/system/server/profileservice/repository.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jun 4 09:07:25 EDT 2010
Author: emuckenhuber
Date: 2010-06-04 09:07:24 -0400 (Fri, 04 Jun 2010)
New Revision: 105720
Modified:
branches/JBPAPP_5_1/system/src/main/org/jboss/system/server/profileservice/repository/StaticProfileFactory.java
Log:
JBPAPP-4426
Modified: branches/JBPAPP_5_1/system/src/main/org/jboss/system/server/profileservice/repository/StaticProfileFactory.java
===================================================================
--- branches/JBPAPP_5_1/system/src/main/org/jboss/system/server/profileservice/repository/StaticProfileFactory.java 2010-06-04 12:37:07 UTC (rev 105719)
+++ branches/JBPAPP_5_1/system/src/main/org/jboss/system/server/profileservice/repository/StaticProfileFactory.java 2010-06-04 13:07:24 UTC (rev 105720)
@@ -76,6 +76,9 @@
/** The application uris. */
private List<URI> applicationURIs;
+
+ /** Ignore non existing application URIs. */
+ private boolean ignoreNonExistingApplicationURIs = false;
public String getBootstrapName()
{
@@ -159,6 +162,16 @@
this.applicationURIs = applicationURIs;
}
+ public boolean isIgnoreNonExistingApplicationURIs()
+ {
+ return ignoreNonExistingApplicationURIs;
+ }
+
+ public void setIgnoreNonExistingApplicationURIs(boolean ignoreNonExistingApplicationURIs)
+ {
+ this.ignoreNonExistingApplicationURIs = ignoreNonExistingApplicationURIs;
+ }
+
public void create() throws Exception
{
// Sanity checks
@@ -168,7 +181,30 @@
throw new IllegalStateException("Null deployers uri.");
if(this.applicationURIs == null)
throw new IllegalStateException("Null application uris.");
+
+ if(isIgnoreNonExistingApplicationURIs())
+ {
+ // Sanitize application URIss
+ List<URI> applicationUris = new ArrayList<URI>();
+ for(URI uri : getApplicationURIs())
+ {
+ File file = new File(uri);
+ if(file.exists())
+ {
+ applicationUris.add(file.toURI());
+ }
+ }
+ this.applicationURIs = applicationUris;
+ }
}
+
+ public void start()
+ {
+ if(applicationURIs == null || applicationURIs.isEmpty())
+ {
+ throw new IllegalStateException("null or empty application URIs");
+ }
+ }
/**
* Create the legacy profiles, based on the injected uris.
More information about the jboss-cvs-commits
mailing list