1 23 package com.sun.enterprise.management.deploy; 24 25 import java.util.Collections ; 26 import java.util.Map ; 27 import java.util.HashMap ; 28 29 import java.io.File ; 30 31 import com.sun.appserv.management.deploy.DeploymentSource; 32 import com.sun.appserv.management.base.QueryMgr; 33 import com.sun.appserv.management.util.misc.TypeCast; 34 35 36 public final class DeployThreadParams 37 { 38 private final File mDeployFile; 39 private final File mPlanFile; 40 private final Map <String ,Object > mOptions; 41 private final DeploymentSource mDeploymentSource; 42 private final DeploymentSource mDeploymentPlan; 43 private final QueryMgr mQueryMgr; 44 45 private 46 DeployThreadParams( 47 final QueryMgr queryMgr, 48 final Map <String ,?> options, 49 final File deployFile, 50 final File planFile, 51 final DeploymentSource source, 52 final DeploymentSource plan ) 53 { 54 assert( (deployFile == null && source != null) || 55 (deployFile != null && source == null) ); 56 57 mDeployFile = deployFile; 58 mPlanFile = planFile; 59 mOptions = options == null ? 60 new HashMap <String ,Object >() : 61 Collections.unmodifiableMap( 62 TypeCast.checkMap( options, String .class, Object .class)); 63 mDeploymentSource = source; 64 mDeploymentPlan = plan; 65 mQueryMgr = queryMgr; 66 } 67 68 69 public 70 DeployThreadParams( 71 final QueryMgr queryMgr, 72 final Map <String ,?> options, 73 final File deployFile, 74 final File planFile ) 75 { 76 this( queryMgr, options, deployFile, planFile, null, null ); 77 } 78 79 public 80 DeployThreadParams( 81 final QueryMgr queryMgr, 82 final Map <String ,?> options, 83 final DeploymentSource source, 84 final DeploymentSource plan ) 85 { 86 this( queryMgr, options, null, null, source, plan ); 87 } 88 89 public File getDeployFile() { return( mDeployFile ); } 90 public File getPlanFile() { return( mPlanFile ); } 91 public Map <String ,?> getOptions() { return( mOptions ); } 92 public QueryMgr getQueryMgr() { return( mQueryMgr ); } 93 public DeploymentSource getDeploymentSource() { return( mDeploymentSource ); } 94 public DeploymentSource getDeploymentPlan() { return( mDeploymentPlan ); } 95 } 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | Popular Tags |