com.ibm.itim.common
Class Badge

java.lang.Object
  extended by com.ibm.itim.common.Badge
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Badge>

public class Badge
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<Badge>

Class to represent a special label with associated display style information

See Also:
Serialized Form

Field Summary
static java.lang.String BADGE_PROPERTIES_FILE
           
static java.lang.String BADGE_TEXT
           
static java.lang.String SPECIFICATION_DELIMITER
           
 
Constructor Summary
Badge()
          Default constructor
Badge(java.lang.String badgeValueSpecification)
          Special constructor to parse the given string according to badge value specification.
Badge(java.lang.String key, java.lang.String style)
          Constructor
 
Method Summary
 int compareTo(Badge o)
           
static java.lang.String composeBadgeSpecification(Badge badge)
          This method takes the designation and generates the key from designation.
static java.lang.String composeBadgeSpecification(java.lang.String designation, java.lang.String style)
           
 boolean equals(java.lang.Object obj)
           
static java.lang.String getBadgeTextFromPropertyFile(java.lang.String key)
          Method to read the label from property file.
 java.lang.String getDesignation()
           
 java.lang.String getKey()
           
 java.lang.String getStyle()
           
 int hashCode()
           
static Badge parseBadgeValueSpecification(java.lang.String badgeValueSpecification)
          Parse given value which is expected to be formatted in the following way: ~ This means that the tilde character '~' is disallowed in both and parts of the value;
 void setDesignation(java.lang.String designation)
           
 void setKey(java.lang.String key)
           
 void setStyle(java.lang.String style)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BADGE_PROPERTIES_FILE

public static final java.lang.String BADGE_PROPERTIES_FILE
See Also:
Constant Field Values

BADGE_TEXT

public static final java.lang.String BADGE_TEXT
See Also:
Constant Field Values

SPECIFICATION_DELIMITER

public static final java.lang.String SPECIFICATION_DELIMITER
See Also:
Constant Field Values
Constructor Detail

Badge

public Badge()
Default constructor


Badge

public Badge(java.lang.String key,
             java.lang.String style)
Constructor

Parameters:
badge - text - key of badge text defined in Badge.properties file
style - formatting - I.e: CSS formatting

Badge

public Badge(java.lang.String badgeValueSpecification)
Special constructor to parse the given string according to badge value specification.

Parameters:
badgeValueSpecification -
Method Detail

getKey

public java.lang.String getKey()

setKey

public void setKey(java.lang.String key)

getBadgeTextFromPropertyFile

public static java.lang.String getBadgeTextFromPropertyFile(java.lang.String key)
Method to read the label from property file.

Parameters:
key -
Returns:

parseBadgeValueSpecification

public static Badge parseBadgeValueSpecification(java.lang.String badgeValueSpecification)
Parse given value which is expected to be formatted in the following way: ~ This means that the tilde character '~' is disallowed in both and parts of the value;

Parameters:
badgeValueSpecification -
Returns:
Badge object

composeBadgeSpecification

public static java.lang.String composeBadgeSpecification(Badge badge)
This method takes the designation and generates the key from designation. This is used to then create a key to composes badge designation.

Parameters:
badge -
Returns:

composeBadgeSpecification

public static java.lang.String composeBadgeSpecification(java.lang.String designation,
                                                         java.lang.String style)

getDesignation

public java.lang.String getDesignation()

setDesignation

public void setDesignation(java.lang.String designation)

getStyle

public java.lang.String getStyle()

setStyle

public void setStyle(java.lang.String style)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(Badge o)
Specified by:
compareTo in interface java.lang.Comparable<Badge>


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.