[jboss-cvs] JBossAS SVN: r74792 - trunk/system/src/main/org/jboss/system/server/profileservice/repository.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jun 18 08:15:24 EDT 2008
Author: alesj
Date: 2008-06-18 08:15:23 -0400 (Wed, 18 Jun 2008)
New Revision: 74792
Modified:
trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java
Log:
Use dirs directly, not over uri.
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java 2008-06-18 11:54:58 UTC (rev 74791)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java 2008-06-18 12:15:23 UTC (rev 74792)
@@ -249,10 +249,9 @@
try
{
// Write the content out
- URI uri = getPhaseURI(phase);
- if(uri == null)
- throw new FileNotFoundException("Failed to obtain content URI for phase: "+phase);
- File contentRoot = new File(uri);
+ File contentRoot = getPhaseDir(phase);
+ if(contentRoot == null)
+ throw new FileNotFoundException("Failed to obtain content dir for phase: "+phase);
File contentFile = new File(contentRoot, name);
if(failIfAlreadyExists && contentFile.exists())
throw new SyncFailedException("Deployment content already exists: "+contentFile.getAbsolutePath());
@@ -718,6 +717,27 @@
return uri;
}
+ protected File getPhaseDir(DeploymentPhase phase)
+ {
+ File dir = null;
+ switch( phase )
+ {
+ case BOOTSTRAP:
+ dir = bootstrapDir;
+ break;
+ case DEPLOYER:
+ dir = deployersDir;
+ break;
+ case APPLICATION:
+ dir = applicationDirs[0];
+ break;
+ case APPLICATION_TRANSIENT:
+ // TODO
+ break;
+ }
+ return dir;
+ }
+
protected URI getBootstrapURI()
{
return bootstrapDir.toURI();
@@ -743,8 +763,7 @@
protected Collection<VFSDeployment> getDeployers()
throws Exception
{
- Collection<VFSDeployment> ctxs = deployerCtxs.values();
- return ctxs;
+ return deployerCtxs.values();
}
protected VFSDeployment getApplication(String vfsPath)
@@ -774,8 +793,7 @@
protected Collection<VFSDeployment> getApplications()
throws Exception
{
- Collection<VFSDeployment> ctxs = applicationCtxs.values();
- return ctxs;
+ return applicationCtxs.values();
}
protected VFSDeployment removeBootstrap(String vfsPath) throws IOException
More information about the jboss-cvs-commits
mailing list