Skip to content

Commit

Permalink
Make help strings static and final
Browse files Browse the repository at this point in the history
Target: trunk
Require-notes: no
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5104/
  • Loading branch information
Gerd Behrmann committed Jan 18, 2013
1 parent 2ba5c9f commit 73bfa59
Show file tree
Hide file tree
Showing 50 changed files with 355 additions and 355 deletions.
Expand Up @@ -750,7 +750,7 @@ public void routeDeleted(CellEvent ce) {}
// methods which are automatically scanned by
// the CommandInterpreterFacility
//
public String fh_set_printout =
public static final String fh_set_printout =
"Syntax: set printout <level>\n\n"+
"Obsolete: Replaced by the log4j command set, see help in the\n" +
" System cell. The printout level now only controls the\n" +
Expand Down
34 changes: 17 additions & 17 deletions modules/cells/src/main/java/dmg/cells/nucleus/CellShell.java
Expand Up @@ -371,7 +371,7 @@ public Object ac_getcellinfos( Args args ){
//
public String hh_waitfor=
"context|cell|domain <objectName> [<domain>] [-i=<checkInterval>] [-wait=<maxTime>]" ;
public String fh_waitfor =
public static final String fh_waitfor =
"waitfor [options] context <contextName> [<domainName]\n" +
"waitfor [options] cell <cellPath>\n" +
"waitfor [options] domain <domainName>\n"+
Expand Down Expand Up @@ -507,7 +507,7 @@ private String _waitForCell( String cellName ,
// set printout <cellname> <level>
//
public String hh_set_printout = "<cellname>|CellGlue <level>" ;
public String fh_set_printout =
public static final String fh_set_printout =
"Syntax: set printout <cellname> <level(hex)>\n\n"+
"Obsolete: Replaced by the log4j command set, see help in the\n" +
" System cell. The printout level now only controls the\n" +
Expand Down Expand Up @@ -548,23 +548,23 @@ private String _waitForCell( String cellName ,
//
// route
//
public String fh_route =
public static final String fh_route =
" Syntax : route # show all routes\n"+
" route add|delete [options] <source> <destination>\n" ;

public String ac_route_$_0( Args args ){
return _nucleus.getRoutingTable().toString() ;
}
public String hh_route_add = "-options <source> <destination>" ;
public String fh_route_add = fh_route ;
public static final String fh_route_add = fh_route ;
public String ac_route_add_$_1_2(Args args)
throws IllegalArgumentException
{
_nucleus.routeAdd( new CellRoute( args ) );
return "Done\n" ;
}
public String hh_route_delete = "-options <source> <destination>" ;
public String fh_route_delete = fh_route ;
public static final String fh_route_delete = fh_route ;
public String ac_route_delete_$_1_2(Args args)
throws IllegalArgumentException
{
Expand All @@ -588,7 +588,7 @@ private String _waitForCell( String cellName ,
// ps -af <cellname>
//
public String hh_ps = "[-f] [<cellName> ...]" ;
public String fh_ps =
public static final String fh_ps =
" Syntax : ps [-f] [<cellName> ...]\n" +
" ps displays various attibutes of active cells\n"+
" or the full attributes of a particular cell\n" +
Expand Down Expand Up @@ -659,7 +659,7 @@ private String _waitForCell( String cellName ,
// kill
//
public String hh_kill= "<cellName>" ;
public String fh_kill =
public static final String fh_kill =
" Syntax : kill <cellName>\n"+
" Starts the killl mechanism on the specified cell\n"+
" and removes it from the cell list\n" ;
Expand All @@ -675,7 +675,7 @@ private String _waitForCell( String cellName ,
// send [-w] <cellAddress> <message>
//
public String hh_send = "[-w] <cellAddress> <message>" ;
public String fh_send =
public static final String fh_send =
" Syntax : send [options] <cellAddress> <message>\n"+
" Sends the message <message> to the specified\n"+
" <cellAddress>.\n"+
Expand Down Expand Up @@ -803,7 +803,7 @@ private String _waitForCell( String cellName ,
//
// domain class loader routines
//
public String fh_set_classloader =
public static final String fh_set_classloader =
" set classloader <packageSelection> <provider>\n"+
" <packageSelection> : e.g. java.lang.*\n"+
" <provider> : \n"+
Expand Down Expand Up @@ -972,7 +972,7 @@ public String ac_show_onexit( Args args ){
return _doOnExit != null ? _doOnExit : "" ;
}
public String hh_say = "<things to echo ...> [-level=<level>]" ;
public String fh_say =
public static final String fh_say =
"<things to echo ...> [-level=<level>]\n"+
" Levels :\n" +
" say,esay,fsay\n"+
Expand Down Expand Up @@ -1092,7 +1092,7 @@ public String ac_id( Args args ){
return answer ;

}
public String fh_check =
public static final String fh_check =
" check [-strong] <var1> [<var2> [] ... ]\n"+
" checks if all of the specified variables are set.\n"+
" Returns an error it not.\n"+
Expand Down Expand Up @@ -1127,7 +1127,7 @@ public String ac_id( Args args ){
return "" ;

}
public String fh_import_context =
public static final String fh_import_context =
" import context|env [options] <variableName>\n" +
" options :\n"+
" -c : don't overwrite\n"+
Expand All @@ -1140,7 +1140,7 @@ public String ac_id( Args args ){
" separated by the '=' sign.\n"+
" The context/environment variables are set according to\n"+
" the assignment.\n" ;
public String fh_import_env = fh_import_context ;
public static final String fh_import_env = fh_import_context ;

public String hh_import_context = "[-source=context|env] [-nr]"+
"<contextVariableName>" ;
Expand Down Expand Up @@ -1209,13 +1209,13 @@ private String imprt_dict(Args args, Map<String,Object> dict)
return "";
}

public String fh_set_context =
public static final String fh_set_context =
"set context|env [options] <variableName> <value>\n"+
" options :\n"+
" -c : do not overwrite the variable if it's already set\n"+
" -s : run the value through the interpreter and\n"+
" convert '\\n' to a real newline" ;
public String fh_set_env = fh_set_context ;
public static final String fh_set_env = fh_set_context ;
public String hh_set_context = "[-c][-s] <contextName> <value>" ;
public String hh_set_env = "[-c][-s] <environmentName> <value>" ;
public String ac_set_context_$_2( Args args )throws CommandException{
Expand Down Expand Up @@ -1302,7 +1302,7 @@ private String unset_dict(Args args, Map<String,Object> dict)
// displaying the context/environment variables
//
public String hh_ls = "[-l] [-ll] [-e] [-list]" ;
public String fh_ls =
public static final String fh_ls =
" ls [options]\n"+
" Prints context/environment\n"+
" Options\n"+
Expand Down Expand Up @@ -1849,7 +1849,7 @@ private String run_reader(URI uri, Args args)
//
// the incredible copy command
//
public String fh_copy =
public static final String fh_copy =
" copy <fromCellURL> <toCellURL>\n"+
" <fromCellURL> : <extendedCellURL>\n"+
" Protocols : env/context/cell/http/file/ftp\n"+
Expand Down
Expand Up @@ -235,7 +235,7 @@ public void messageArrived( CellMessage msg ){
// //
// the interpreter stuff //
// //
public String fh_set_sync =
public static final String fh_set_sync =
" Syntax : set sync on|off \n" +
" sets the message send mode to synchronized or\n"+
" asynchronized mode. The default timeout for the\n"+
Expand Down
Expand Up @@ -63,7 +63,7 @@ public static void main( String [] args ){
public String hh_set_global_variable = "<key> <value>" ;
public String ac_set_global_variable_$_2( Args args ){ return "" ; }
public String hh_set_sync = "on|off" ;
public String fh_set_sync =
public static final String fh_set_sync =
" Syntax : set sync on | off\n"+
" Action : sets the synchronization mode to the\n"+
" specified value\n" ;
Expand Down
Expand Up @@ -57,7 +57,7 @@ public void shouldFindHintField() throws Exception
{
Map<List<String>,? extends CommandExecutor> commands =
_scanner.scan(new Object() {
public final String hh_test = "help";
public static final String hh_test = "help";
});

assertThat(commands.get(asList("test")).getHelpHint(), is("help"));
Expand All @@ -68,7 +68,7 @@ public void shouldFindHelpField() throws Exception
{
Map<List<String>,? extends CommandExecutor> commands =
_scanner.scan(new Object() {
public final String fh_test = "long help";
public static final String fh_test = "long help";
});

assertThat(commands.get(asList("test")).getFullHelp(), is("long help"));
Expand Down
Expand Up @@ -745,7 +745,7 @@ public String com_status(int sessionId, int commandId, VspArgs args)
" ok "+" 0 " + "\""+handler+ "\"" ;
}

public String hh_get_door_info = "[-binary]" ;
public static final String hh_get_door_info = "[-binary]" ;
public Object ac_get_door_info( Args args ){
IoDoorInfo info = new IoDoorInfo( _cell.getCellInfo().getCellName() ,
_cell.getCellInfo().getDomainName() ) ;
Expand All @@ -766,7 +766,7 @@ public Object ac_get_door_info( Args args ){
return info.toString();
}
}
public String hh_toclient = " <id> <subId> server <command ...>" ;
public static final String hh_toclient = " <id> <subId> server <command ...>" ;
public String ac_toclient_$_3_99( Args args )
{
StringBuilder sb = new StringBuilder() ;
Expand All @@ -778,7 +778,7 @@ public Object ac_get_door_info( Args args ){
println(str);
return "" ;
}
public String hh_retry = "<sessionId> [-weak]" ;
public static final String hh_retry = "<sessionId> [-weak]" ;
public String ac_retry_$_1( Args args ) throws Exception {
int sessionId = Integer.parseInt(args.argv(0));
SessionHandler session;
Expand Down
Expand Up @@ -1276,7 +1276,7 @@ protected void login(Subject subject)
protected AdminCommandListener adminCommandListener;
public class AdminCommandListener
{
public String hh_get_door_info = "[-binary]";
public static final String hh_get_door_info = "[-binary]";
public Object ac_get_door_info(Args args)
{
IoDoorInfo doorInfo = new IoDoorInfo(getCellName(),
Expand Down
Expand Up @@ -179,7 +179,7 @@ public CellDomainNode[] getInfoMap()
new CellDomainNode[_currentMap.size()]);
}

public final String hh_update = "# initiates background update";
public static final String hh_update = "# initiates background update";
public String ac_update(Args args)
throws JMSException
{
Expand Down
Expand Up @@ -38,7 +38,7 @@ public AdminShell( String user , CellNucleus nucleus , Args args ){
public String getHello(){
return "\n Welcome to the dCache Admin Interface (user="+_user+")\n\n" ;
}
public String hh_id = "[<newId>]" ;
public static final String hh_id = "[<newId>]" ;
public String ac_id_$_0_1( Args args )
{

Expand All @@ -53,13 +53,13 @@ public String getHello(){
return _user+"\n" ;
}
}
public String hh_cd = "<destinationCell>" ;
public static final String hh_cd = "<destinationCell>" ;
public String ac_cd_$_1( Args args )
{
_cellPath = new CellPath(args.argv(0));
return "" ;
}
public String hh_pwd = "" ;
public static final String hh_pwd = "" ;
public String ac_pwd_$_0( Args args )
{
return _cellPath.toString() + "\n" ;
Expand Down
Expand Up @@ -34,7 +34,7 @@ public String getPrompt(){
"<local>("+getUser()+") " :
"<"+_destination+">("+getUser()+") ";
}
public String hh_cd = "<destinationCell>";
public static final String hh_cd = "<destinationCell>";
public Object ac_cd_$_1( Args args ){
_destination = args.argc() == 0 ? null : args.argv(0) ;
return "" ;
Expand Down
Expand Up @@ -636,7 +636,7 @@ private UserRecord( Attributes userRecord ){
// r[3] : <user>
// r[4] : <key>[,<key>[...]]
//
public String hh_check_meta = "<user>" ;
public static final String hh_check_meta = "<user>" ;
public String ac_check_meta_$_1(Args args ) throws Exception {
Object [] request = new Object[5] ;
request[0] = "request" ;
Expand All @@ -660,7 +660,7 @@ private UserRecord( Attributes userRecord ){

return sb.toString();
}
public String hh_check_auth = "<user> <password>" ;
public static final String hh_check_auth = "<user> <password>" ;
public String ac_check_auth_$_2( Args args )
{
String user = args.argv(0) ;
Expand All @@ -669,7 +669,7 @@ private UserRecord( Attributes userRecord ){
return result ? "Authentication ok for user <"+user+">" :
"Authentication failed for user <"+user+">" ;
}
public String hh_user_map_ls = "# [-t]" ;
public static final String hh_user_map_ls = "# [-t]" ;
public String ac_user_map_ls( Args args ){
if( _map == null ) {
throw new
Expand All @@ -682,7 +682,7 @@ public String ac_user_map_ls( Args args ){
}
return sb.toString() ;
}
public String hh_user_map_remove = "<userName> # remove user from hash";
public static final String hh_user_map_remove = "<userName> # remove user from hash";
public String ac_user_map_remove_$_1(Args args ){
if( _map == null ) {
throw new
Expand All @@ -697,7 +697,7 @@ public String ac_user_map_ls( Args args ){

return "";
}
public String hh_user_map_add = "<userName> <uid> <gid> [<home> [<shell>]]" ;
public static final String hh_user_map_add = "<userName> <uid> <gid> [<home> [<shell>]]" ;
public String ac_user_map_add_$_3_5( Args args ){
String user = args.argv(0) ;
String uid = args.argv(1) ;
Expand All @@ -718,7 +718,7 @@ public String ac_user_map_ls( Args args ){
_map.put( user , ur ) ;
return "" ;
}
public String hh_user_map_reset = "# clear user map hash" ;
public static final String hh_user_map_reset = "# clear user map hash" ;
public String ac_user_map_reset( Args args ){
if( _map == null ) {
throw new
Expand Down

0 comments on commit 73bfa59

Please sign in to comment.