1 23 package com.sun.enterprise.diagnostics; 24 25 import com.sun.enterprise.server.ApplicationServer; 26 import com.sun.logging.LogDomains; 27 import java.util.logging.Logger ; 28 import java.util.List ; 29 import java.io.File ; 30 34 public class ReportTarget { 35 protected String targetDir; 36 protected String targetName; 37 protected String repositoryName; 38 protected String repositoryDir; 39 protected TargetType type; 40 protected List <String > instances; 41 private boolean local ; 42 private static Logger logger = 43 LogDomains.getLogger(LogDomains.ADMIN_LOGGER); 44 45 46 public ReportTarget(String repositoryDir, String repositoryName, String targetName, 47 TargetType type, List <String > instances, boolean local) { 48 this.repositoryDir = repositoryDir; 49 this.repositoryName = repositoryName; 50 this.targetDir = repositoryDir + File.separator + repositoryName; 51 this.targetName = targetName; 52 this.type = type; 53 this.instances = instances; 54 this.local = local; 55 56 } 57 61 public TargetType getType() { 62 return type; 63 } 64 65 69 public String getName() { 70 return targetName; 71 } 72 73 74 77 public String getRepositoryDir() { 78 return repositoryDir; 79 } 80 81 public String getTargetDir() { 82 return targetDir; 83 } 84 85 public String getRepositoryName() { 86 return repositoryName; 87 } 88 92 public String getIntermediateReportDir() { 93 return getArchiveDir() + File.separator + targetName; 94 } 95 96 public String getArchiveDir(){ 97 return repositoryDir + File.separator + 98 repositoryName + Defaults.TEMP_REPORT_FOLDER; 99 } 100 101 104 public String getDefaultReportDir() { 105 return targetDir + Defaults.REPORT_FOLDER; 106 } 107 108 public List <String > getInstances() { 109 return instances; 110 } 111 public String toString() { 112 return getName() +"," + getType() + "," + getRepositoryDir() + "," + 113 getIntermediateReportDir() + "," + getDefaultReportDir() + 114 "," + getInstances(); 115 } 116 } 117 | Popular Tags |