|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.ObjectNameConverter
Converts forbidden characters in the key and value of an object name
to valid characters and back.
Character Conversion Table: (based on RFC 1738 style escapes
'%' => '%25'
'*' => '%2a'
',' => '%2c'
':' => '%3a'
'?' => '%3f'
'=' => '%3d'
Thanx to William Hoyle for mention this
Attention:When you have a comma in one of your property
value then you have to use a Hashtable to provide the properties
otherwise the property parsing will fail.
Constructor Summary | |
ObjectNameConverter()
|
Method Summary | |
static ObjectName |
convert(String pObjectName)
Parses the given Object Name String representation and replaces any invalid characters in property keays and values with valid characters. |
static ObjectName |
convert(String pDomainName,
Hashtable pProperties)
Check the keys and values of the properties and convert invalid characters |
static String |
convertCharacters(String pValue,
boolean pEncrypt)
Encrypt or decrypt the forbidden characters in an Object Name value property |
static Hashtable |
getProperties(ObjectName pObjectName)
Takes the properties from the given Object Name and convert special characters back |
static String |
getString(ObjectName pObjectName)
Takes the properties from the given Object Name and convert special characters back |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ObjectNameConverter()
Method Detail |
public static ObjectName convert(String pObjectName) throws MalformedObjectNameException
convert( String, Hashtable )
instead because the properties
are already parsed (by you).
pObjectName
- String representing an Object Name which must
not contain a comman inside a property value
MalformedObjectNameException
- If the given Object Name
is not correctpublic static ObjectName convert(String pDomainName, Hashtable pProperties) throws MalformedObjectNameException
pDomainName
- Name of the Domain
MalformedObjectNameException
- If the given Object Name
is not correctpublic static Hashtable getProperties(ObjectName pObjectName)
pObjectName
- Given Object Name
public static String getString(ObjectName pObjectName)
pObjectName
- Given Object Name
public static String convertCharacters(String pValue, boolean pEncrypt)
pValue
- Property Value of the Object Name's property list to be en- or decryptedpEncrypt
- True if the value must be encrypted otherwise decrypted
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |