org.openpermis.examples.common
Class HelloWorldUtilities

java.lang.Object
  extended by org.openpermis.examples.common.HelloWorldUtilities

public final class HelloWorldUtilities
extends Object

Helper functions used by the sample.

The helper functions have been moved here to prevent that the reader of the hello world gets distracted by auxiliary helper functions.

Since:
0.1.0

Field Summary
static String COLLECT_LETTERS
           
static String INSERT_LETTER
           
static String JOHN
           
static String SARA
           
private static String[] VALID_ACTIONS
           
private static List<String[]> VALID_ARGS_LIST
          List of valid command line arguments.
private static String[] VALID_PRINCIPALS
           
 
Constructor Summary
private HelloWorldUtilities()
          Objects of this class cannot be instantiated.
 
Method Summary
static void fatalError(String message, Throwable cause)
          Logs a fatal error and terminates the application.
static List<String[]> validateInput(String[] args)
          Simple helper function to validate the command line arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SARA

public static final String SARA
Constant Field Value:
"cn=sara,o=post,c=ch"
Since:
0.4.0

JOHN

public static final String JOHN
Constant Field Value:
"cn=john,o=post,c=ch"
Since:
0.4.0

INSERT_LETTER

public static final String INSERT_LETTER
Constant Field Value:
"insertLetter"
Since:
0.4.0

COLLECT_LETTERS

public static final String COLLECT_LETTERS
Constant Field Value:
"collectLetters"
Since:
0.4.0

VALID_ARGS_LIST

private static final List<String[]> VALID_ARGS_LIST
List of valid command line arguments.


VALID_PRINCIPALS

private static final String[] VALID_PRINCIPALS

VALID_ACTIONS

private static final String[] VALID_ACTIONS
Constructor Detail

HelloWorldUtilities

private HelloWorldUtilities()
Objects of this class cannot be instantiated.

Since:
0.1.0
Method Detail

validateInput

public static List<String[]> validateInput(String[] args)
Simple helper function to validate the command line arguments.

Parameters:
args - the arguments to validate.
Returns:
the input arguments to run the hello world with.
Since:
0.1.0

fatalError

public static final void fatalError(String message,
                                    Throwable cause)
Logs a fatal error and terminates the application.

Parameters:
message - the message to log.
cause - the cause of the fatal error.
Since:
0.3.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:18:05
Copyright (c) 2002-2007 Ergon Informatik AG