Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.resourcebundle
Class CustomizableResourceBundleKeyGenerator

java.lang.Object
  extended by oracle.javatools.resourcebundle.CustomizableResourceBundleKeyGenerator

All Implemented Interfaces:
ResourceBundleKeyGenerator

public class CustomizableResourceBundleKeyGenerator
extends java.lang.Object
implements ResourceBundleKeyGenerator

Field Summary
static int minimumKeyMaximumLength
           

 

Constructor Summary
CustomizableResourceBundleKeyGenerator()
          Provides a ResourceBundleKeyGenerator implementation can be customized with respects to the minimum and maximum key length as well as the what number will be used as the starting sequence if a key generated by this generator needs to have a number attached to the end to provide a unique key.

 

Method Summary
 java.lang.String createKeyNameFromText(ResourceBundleWrapper resourceBundleWrapper, java.lang.String string)
          Creates a unique key for the given display string
 int getKeyMaximumLength()
          Gets the maximum length of a key
 int getKeyMinimumLength()
          Gets the minimum length of a key
 int getSequenceStartsWith()
          Gets the number to use as a starting piont for generating a unique key when the key would otherwise not be unique.
 void setKeyMaximumLength(int newkeyMaximumLength)
          The key maximum length should be greater than 8 to keep key uniqueness.
 void setKeyMinmumLength(int length)
          Sets the minimum length of a key.
 void setSequenceStartsWith(int newsequenceStartsWith)
          Sets the number to use when generating a new sequence for a key that would otherwise not be unique.
 java.lang.String validateKeyNameFromText(ResourceBundleWrapper resourceBundleWrapper, java.lang.String string)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

minimumKeyMaximumLength

public static int minimumKeyMaximumLength

Constructor Detail

CustomizableResourceBundleKeyGenerator

public CustomizableResourceBundleKeyGenerator()
Provides a ResourceBundleKeyGenerator implementation can be customized with respects to the minimum and maximum key length as well as the what number will be used as the starting sequence if a key generated by this generator needs to have a number attached to the end to provide a unique key.

Method Detail

createKeyNameFromText

public java.lang.String createKeyNameFromText(ResourceBundleWrapper resourceBundleWrapper,
                                              java.lang.String string)
Creates a unique key for the given display string
Specified by:
createKeyNameFromText in interface ResourceBundleKeyGenerator
Parameters:
resourceBundleWrapper - the bundle to generate a key for
string - the string displayed to the user
Returns:
a unique key for the specified bundle based on the provided display string
See Also:
ResourceBundleWrapper

validateKeyNameFromText

public java.lang.String validateKeyNameFromText(ResourceBundleWrapper resourceBundleWrapper,
                                                java.lang.String string)
Specified by:
validateKeyNameFromText in interface ResourceBundleKeyGenerator

setKeyMaximumLength

public void setKeyMaximumLength(int newkeyMaximumLength)
The key maximum length should be greater than 8 to keep key uniqueness.
Parameters:
newkeyMaximumLength -

getKeyMaximumLength

public int getKeyMaximumLength()
Gets the maximum length of a key
Returns:
the maximum length of a key

setKeyMinmumLength

public void setKeyMinmumLength(int length)
Sets the minimum length of a key. Must be 1 or greater, anything less will be set to 1
Parameters:
the - minimum length of a key

getKeyMinimumLength

public int getKeyMinimumLength()
Gets the minimum length of a key
Returns:
the minimum length of a key

setSequenceStartsWith

public void setSequenceStartsWith(int newsequenceStartsWith)
Sets the number to use when generating a new sequence for a key that would otherwise not be unique.
Parameters:
newsequenceStartsWith - number to use as the starting point

getSequenceStartsWith

public int getSequenceStartsWith()
Gets the number to use as a starting piont for generating a unique key when the key would otherwise not be unique.
Returns:
the number to use as a starting piont for generating a unique key when the key would otherwise not be unique.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.