FileDocCategorySizeDatePackage
CLIOptions.javaAPI DocGlassfish v2 API6427Fri May 04 22:34:40 BST 2007com.sun.enterprise.diagnostics

CLIOptions

public class CLIOptions extends Object
Represents CLI options and operand provided by the user at the time of report generation
author
Manisha Umbarje

Fields Summary
private static final String
OUTPUT_FILE
private static final String
FILE
private static final String
CUSTOMER_INPUT
private static final String
BUG_IDS
private static final String
LOG_START_DATE
private static final String
LOG_END_DATE
private static final String
TARGET_DIR
private static final String
TARGET
private static final String
USER
private static final String
PASSWD
private static final String
LOCAL_FLAG
private Date
startDate
private Date
endDate
private String
customerInput
private String
customerInputFile
private String
bugIds
private String
destReportFile
private String
reportDir
private String
targetDir
private String
targetName
private String
targetType
private String
user
private String
passwd
private boolean
local
private Map
map
Constructors Summary
public CLIOptions(Map options)

       
        
        this((Date)options.get(LOG_START_DATE), 
            (Date)options.get(LOG_END_DATE),
            (String)options.get(FILE),
            (String)options.get(CUSTOMER_INPUT),
            (String)options.get(BUG_IDS),
            (String)options.get(OUTPUT_FILE),
            (String)options.get(TARGET_DIR),
            (String)options.get(TARGET),
            (String)options.get(USER),
            (String)options.get(PASSWD),
            Boolean.valueOf((String)options.get(LOCAL_FLAG)).booleanValue());
            this.map = options;
        
            
    
public CLIOptions(Date startDate, Date endDate, String file, String customerInput, String bugIds, String destReportFile, String targetDir, String targetName, String user, String passwd, boolean local)

	this.startDate = startDate;
	this.endDate = endDate;
	this.targetName = targetName;
	this.targetDir = targetDir;
	this.destReportFile = destReportFile;
	this.local = local;
        this.customerInputFile = file;
        this.customerInput = customerInput;
        this.bugIds = bugIds;
        this.user = user;
        this.passwd = passwd;
    
Methods Summary
public java.lang.StringgetBugIds()
Returns bugids provided by the customer

return
bugids entered by customer

        return bugIds;
    
public java.lang.StringgetCustomerInput()
Returns customer input entered by user in admin GUI

return
customer supplied text

        return customerInput;
    
public java.lang.StringgetCustomerInputFile()
Returns name of customer input file

return
customer supplied text file

        return customerInputFile;
    
public java.util.DategetEndDate()
End Date to which server.log entries need to be collected

	return endDate;
    
public java.util.MapgetMap()

        return map;
    
public java.lang.StringgetPasswd()
Returns passwd

        return passwd;
    
public java.lang.StringgetReportFile()
Returns name of generated report in compressed format

	return destReportFile;
    
public java.util.DategetStartDate()
Begin Date from which server.log contents need to be copied

	return startDate;
    
public java.lang.StringgetTargetDir()
Returns value of CLI option - targetDir if command is being run in local mode

	return targetDir;
    
public java.lang.StringgetTargetName()
Returns targetName

	return targetName;
    
public java.lang.StringgetUser()
Returns user

        return user;
    
public booleanisLocal()
Returns true if command is being run in local mode

	return local;
    
public java.lang.StringtoString()

        return getTargetDir() + ","  + getTargetName() + "," + 
                getCustomerInputFile() + "," + getBugIds() +
                "," + getStartDate() +
                "," + getEndDate() + "," + getReportFile();