public abstract class jlanApp
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CmdLineArg |
static java.lang.String |
CmdLineArg1 |
static java.lang.String |
CmdLineArg2 |
static java.lang.String |
CmdLineArg3 |
static java.lang.String |
CmdLineArg4 |
static java.lang.String |
CmdLineArg5 |
static java.lang.String |
CmdLineArg6 |
protected static java.lang.String |
PropertiesFileName |
protected static java.lang.String |
PropertyBroadcast |
protected static java.lang.String |
PropertyConnectOrder |
protected static java.lang.String |
PropertyDebug |
protected static java.lang.String |
PropertyDomain |
protected static java.lang.String |
PropertyJCEProvider |
protected static java.lang.String |
PropertyNameScope |
protected static java.lang.String |
PropertyPassword |
protected static java.lang.String |
PropertyResolveOrder |
protected static java.lang.String |
PropertyUserName |
protected static java.lang.String |
PropertyWildcardName |
protected static java.lang.String |
PropertyWINS |
protected static int |
RightAlign |
static java.lang.String |
SwitchDomain |
static java.lang.String |
SwitchPassword |
static java.lang.String |
SwitchUserName |
Constructor and Description |
---|
jlanApp(java.lang.String name,
java.lang.String desc)
Class constructor
|
jlanApp(java.lang.String name,
java.lang.String desc,
boolean switches)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doCommand(java.io.PrintStream out)
Perform the specific command processing
|
protected void |
formatOutput(java.io.PrintStream out,
java.lang.String col1,
int width1)
Format an output string and output to the specified stream
|
protected void |
formatOutput(java.io.PrintStream out,
java.lang.String col1,
int width1,
java.lang.String col2,
int width2)
Format an output string and output to the specified stream
|
protected void |
formatOutput(java.io.PrintStream out,
java.lang.String col1,
int width1,
java.lang.String col2,
int width2,
java.lang.String col3,
int width3)
Format an output string and output to the specified stream
|
protected void |
formatOutput(java.io.PrintStream out,
java.lang.String col1,
int width1,
java.lang.String col2,
int width2,
java.lang.String col3,
int width3,
java.lang.String col4,
int width4)
Format an output string and output to the specified stream
|
protected void |
formatOutput(java.io.PrintStream out,
java.lang.String col1,
int width1,
java.lang.String col2,
int width2,
java.lang.String col3,
int width3,
java.lang.String col4,
int width4,
java.lang.String col5,
int width5)
Format an output string and output to the specified stream
|
java.lang.String |
getCommandDescription()
Return the command short description
|
java.lang.String |
getCommandName()
Return the command name
|
protected java.lang.String |
getDomain()
Get a domain name from the command line or properties file
|
protected java.lang.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 java.lang.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(java.io.PrintStream out)
Output the command help
|
protected int |
parseCommandLine(java.lang.String[] args)
Parse the command line
|
protected java.lang.String |
promptForPassword()
Prompt for a password, do not echo to the console
|
void |
runCommand(java.lang.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,
java.io.PrintStream out)
Validate the command line parameters
|
public static final java.lang.String CmdLineArg
public static final java.lang.String CmdLineArg1
public static final java.lang.String CmdLineArg2
public static final java.lang.String CmdLineArg3
public static final java.lang.String CmdLineArg4
public static final java.lang.String CmdLineArg5
public static final java.lang.String CmdLineArg6
public static final java.lang.String SwitchUserName
public static final java.lang.String SwitchPassword
public static final java.lang.String SwitchDomain
protected static final int RightAlign
protected static final java.lang.String PropertiesFileName
protected static final java.lang.String PropertyUserName
protected static final java.lang.String PropertyPassword
protected static final java.lang.String PropertyDomain
protected static final java.lang.String PropertyWINS
protected static final java.lang.String PropertyBroadcast
protected static final java.lang.String PropertyDebug
protected static final java.lang.String PropertyResolveOrder
protected static final java.lang.String PropertyConnectOrder
protected static final java.lang.String PropertyNameScope
protected static final java.lang.String PropertyWildcardName
protected static final java.lang.String PropertyJCEProvider
public jlanApp(java.lang.String name, java.lang.String desc)
name
- Stringdesc
- Stringpublic jlanApp(java.lang.String name, java.lang.String desc, boolean switches)
name
- Stringdesc
- Stringswitches
- booleanpublic final java.lang.String getCommandName()
public final java.lang.String getCommandDescription()
protected abstract void outputCommandHelp(java.io.PrintStream out)
out
- PrintStreamprotected abstract void doCommand(java.io.PrintStream out) throws java.lang.Exception
out
- PrintStreamjava.lang.Exception
protected abstract boolean validateCommandLine(NameValueList cmdLine, java.io.PrintStream out)
cmdLine
- NameValueListout
- PrintStreamprotected final java.lang.String getUserName()
protected final java.lang.String getDomain()
protected final java.lang.String getPassword()
protected final int parseCommandLine(java.lang.String[] args)
args
- String[]public final void runCommand(java.lang.String[] args)
args
- String[]protected final java.lang.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(java.io.PrintStream out, java.lang.String col1, int width1, java.lang.String col2, int width2, java.lang.String col3, int width3, java.lang.String col4, int width4, java.lang.String col5, int width5)
out
- PrintStreamcol1
- Stringwidth1
- intcol2
- Stringwidth2
- intcol3
- Stringwidth3
- intcol4
- Stringwidth4
- intcol5
- Stringwidth5
- intprotected final void formatOutput(java.io.PrintStream out, java.lang.String col1, int width1, java.lang.String col2, int width2, java.lang.String col3, int width3, java.lang.String col4, int width4)
out
- PrintStreamcol1
- Stringwidth1
- intcol2
- Stringwidth2
- intcol3
- Stringwidth3
- intcol4
- Stringwidth4
- intprotected final void formatOutput(java.io.PrintStream out, java.lang.String col1, int width1, java.lang.String col2, int width2, java.lang.String col3, int width3)
out
- PrintStreamcol1
- Stringwidth1
- intcol2
- Stringwidth2
- intcol3
- Stringwidth3
- intprotected final void formatOutput(java.io.PrintStream out, java.lang.String col1, int width1, java.lang.String col2, int width2)
out
- PrintStreamcol1
- Stringwidth1
- intcol2
- Stringwidth2
- intprotected final void formatOutput(java.io.PrintStream out, java.lang.String col1, int width1)
out
- PrintStreamcol1
- StringCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.