public abstract class jlanApp extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CmdLineArg |
static String |
CmdLineArg1 |
static String |
CmdLineArg2 |
static String |
CmdLineArg3 |
static String |
CmdLineArg4 |
static String |
CmdLineArg5 |
static String |
CmdLineArg6 |
protected static String |
PropertiesFileName |
protected static String |
PropertyBroadcast |
protected static String |
PropertyConnectOrder |
protected static String |
PropertyDebug |
protected static String |
PropertyDomain |
protected static String |
PropertyJCEProvider |
protected static String |
PropertyNameScope |
protected static String |
PropertyPassword |
protected static String |
PropertyResolveOrder |
protected static String |
PropertyUserName |
protected static String |
PropertyWildcardName |
protected static String |
PropertyWINS |
protected static int |
RightAlign |
static String |
SwitchDomain |
static String |
SwitchPassword |
static String |
SwitchUserName |
Constructor and Description |
---|
jlanApp(String name,
String desc)
Class constructor
|
jlanApp(String name,
String desc,
boolean switches)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doCommand(PrintStream out)
Perform the specific command processing
|
protected void |
formatOutput(PrintStream out,
String col1,
int width1)
Format an output string and output to the specified stream
|
protected void |
formatOutput(PrintStream out,
String col1,
int width1,
String col2,
int width2)
Format an output string and output to the specified stream
|
protected void |
formatOutput(PrintStream out,
String col1,
int width1,
String col2,
int width2,
String col3,
int width3)
Format an output string and output to the specified stream
|
protected void |
formatOutput(PrintStream out,
String col1,
int width1,
String col2,
int width2,
String col3,
int width3,
String col4,
int width4)
Format an output string and output to the specified stream
|
protected void |
formatOutput(PrintStream out,
String col1,
int width1,
String col2,
int width2,
String col3,
int width3,
String col4,
int width4,
String col5,
int width5)
Format an output string and output to the specified stream
|
String |
getCommandDescription()
Return the command short description
|
String |
getCommandName()
Return the command name
|
protected String |
getDomain()
Get a domain name from the command line or properties file
|
protected String |
getPassword()
Get a password from the command line or properties file
|
protected Session |
getSession()
Return the session
|
protected PCShare |
getShare()
Get the share details
|
protected String |
getUserName()
Get a user name from the command line or properties file
|
protected boolean |
hasCommandSwitches()
Check if the command uses command line switches
|
protected boolean |
hasSession()
Check if there is an active session
|
protected abstract void |
outputCommandHelp(PrintStream out)
Output the command help
|
protected int |
parseCommandLine(String[] args)
Parse the command line
|
protected String |
promptForPassword()
Prompt for a password, do not echo to the console
|
void |
runCommand(String[] args)
Run the command
|
protected void |
setSession(Session sess)
Set the active session
|
protected void |
setShare(PCShare shr)
Set the share details
|
protected abstract boolean |
validateCommandLine(NameValueList cmdLine,
PrintStream out)
Validate the command line parameters
|
public static final String CmdLineArg
public static final String CmdLineArg1
public static final String CmdLineArg2
public static final String CmdLineArg3
public static final String CmdLineArg4
public static final String CmdLineArg5
public static final String CmdLineArg6
public static final String SwitchUserName
public static final String SwitchPassword
public static final String SwitchDomain
protected static final int RightAlign
protected static final String PropertiesFileName
protected static final String PropertyUserName
protected static final String PropertyPassword
protected static final String PropertyDomain
protected static final String PropertyWINS
protected static final String PropertyBroadcast
protected static final String PropertyDebug
protected static final String PropertyResolveOrder
protected static final String PropertyConnectOrder
protected static final String PropertyNameScope
protected static final String PropertyWildcardName
protected static final String PropertyJCEProvider
public jlanApp(String name, String desc)
name
- Stringdesc
- Stringpublic final String getCommandName()
public final String getCommandDescription()
protected abstract void outputCommandHelp(PrintStream out)
out
- PrintStreamprotected abstract void doCommand(PrintStream out) throws Exception
out
- PrintStreamException
protected abstract boolean validateCommandLine(NameValueList cmdLine, PrintStream out)
cmdLine
- NameValueListout
- PrintStreamprotected final String getUserName()
protected final String getDomain()
protected final String getPassword()
protected final int parseCommandLine(String[] args)
args
- String[]public final void runCommand(String[] args)
args
- String[]protected final String promptForPassword()
protected final PCShare getShare()
protected final boolean hasSession()
protected final Session getSession()
protected final boolean hasCommandSwitches()
protected final void setShare(PCShare shr)
shr
- PCShareprotected final void setSession(Session sess)
sess
- Sessionprotected final void formatOutput(PrintStream out, String col1, int width1, String col2, int width2, String col3, int width3, String col4, int width4, String col5, int width5)
out
- PrintStreamcol1
- Stringwidth1
- intcol2
- Stringwidth2
- intcol3
- Stringwidth3
- intcol4
- Stringwidth4
- intcol5
- Stringwidth5
- intprotected final void formatOutput(PrintStream out, String col1, int width1, String col2, int width2, String col3, int width3, String col4, int width4)
out
- PrintStreamcol1
- Stringwidth1
- intcol2
- Stringwidth2
- intcol3
- Stringwidth3
- intcol4
- Stringwidth4
- intprotected final void formatOutput(PrintStream out, String col1, int width1, String col2, int width2, String col3, int width3)
out
- PrintStreamcol1
- Stringwidth1
- intcol2
- Stringwidth2
- intcol3
- Stringwidth3
- intprotected final void formatOutput(PrintStream out, String col1, int width1, String col2, int width2)
out
- PrintStreamcol1
- Stringwidth1
- intcol2
- Stringwidth2
- intprotected final void formatOutput(PrintStream out, String col1, int width1)
out
- PrintStreamcol1
- StringCopyright © 2005–2017 Alfresco Software. All rights reserved.