Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jpos.util
Class JposEntryUtility

    java.lang.Object
      |
      +--jpos.util.JposEntryUtility

public class JposEntryUtility
extends java.lang.Object

Simple class used to validate JposEntry objects

Since:
  1.3 (Tokyo 2001 meeting)
Version:
  1.3.0
Author:
  E. Michael Maximilien (maxim@us.ibm.com)

Method Summary
`(package private) static void` | `()` Initializes the standard set of properties
`static void` | `addMissingRequiredProps(JposEntry jposEntry)` Add defaults all required properties that are missing from this JposEntry
`static JposEntry` | `getEntryPrototype()`
`static java.util.Enumeration` | `getMissingRequiredPropNames(JposEntry jposEntry)`
`static java.util.Enumeration` | `getMissingRS232PropNames(JposEntry jposEntry)`
`static java.util.Enumeration` | `getNonRequiredPropNames(JposEntry jposEntry)`
`static java.util.Iterator` | `getStandardPropNames()`
`static java.util.Enumeration` | `getVendorPropNames(JposEntry jposEntry)`
`static boolean` | `isRequiredPropName(java.lang.String name)`
`static boolean` | `isRS232PropName(java.lang.String name)`
`static boolean` | `isValidJposEntry(JposEntry jposEntry)`
`static boolean` | `isValidPropType(java.lang.Class propType)`
`static java.lang.Object` | `parsePropValue(java.lang.String stringValue, java.lang.Class propType)`
`static java.lang.Class` | `propTypeFromString(java.lang.String typeString)`
`static void` | `removeAllRS232Props(JposEntry jposEntry)` Removes all RS232 specific utilities from this JposEntry
`static java.lang.String` | `shortClassName(java.lang.Class classObject)`
`static boolean` | `validatePropValue(java.lang.Object propValue, java.lang.Class propType)`

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

Method Detail

### isValidJposEntry

    public static boolean isValidJposEntry(JposEntry jposEntry)

  Parameters:
    `jposEntry` - the entry to validate
  Returns:
    true if this entry is valid with all required properties

### isRequiredPropName

    public static boolean isRequiredPropName(java.lang.String name)

  Parameters:
    `name` - the property name
  Returns:
    true if the property name passed is a required property

### isRS232PropName

    public static boolean isRS232PropName(java.lang.String name)

  Parameters:
    `name` - the property name
  Returns:
    true if the property name passed is a RS232 property

### removeAllRS232Props

    public static void removeAllRS232Props(JposEntry jposEntry)

  Removes all RS232 specific utilities from this JposEntry
  Parameters:
    `jposEntry` - the JposEntry to modify

### getStandardPropNames

    public static java.util.Iterator getStandardPropNames()

  Returns:
    an Iterator of all the standard property names

### getNonRequiredPropNames

    public static java.util.Enumeration getNonRequiredPropNames(JposEntry jposEntry)

  Parameters:
    `jposEntry` - the JposEntry
  Returns:
    a enumeration of all non-required property names from the jposEntry

### getMissingRequiredPropNames

    public static java.util.Enumeration getMissingRequiredPropNames(JposEntry jposEntry)

  Parameters:
    `jposEntry` - the entry to validate
  Returns:
    an Enumeration of property names that are required but missing from the JposEntry object passed

### getMissingRS232PropNames

    public static java.util.Enumeration getMissingRS232PropNames(JposEntry jposEntry)

  Parameters:
    `jposEntry` - the entry to validate
  Returns:
    an Enumeration of all RS232 property names that are missing from the JposEntry object passed

### getVendorPropNames

    public static java.util.Enumeration getVendorPropNames(JposEntry jposEntry)

  Parameters:
    `jposEntry` - the JposEntry to find the vendor property names from
  Returns:
    an Enumeration of all non-standard properties, that is vendor properties

### addMissingRequiredProps

    public static void addMissingRequiredProps(JposEntry jposEntry)

  Add defaults all required properties that are missing from this JposEntry
  Parameters:
    `jposEntry` - the JposEntry object

### getEntryPrototype

    public static JposEntry getEntryPrototype()

  Returns:
    a prototypical instance of a JposEntry with all required properties set to their default values

### shortClassName

    public static java.lang.String shortClassName(java.lang.Class classObject)

  Parameters:
    `classObject` - the Class object
  Returns:
    the short name of the Class object passed, that is return the name of the class w/o the package name
  Since:
    2.0.0

### validatePropValue

    public static boolean validatePropValue(java.lang.Object propValue,
                                            java.lang.Class propType)

  Parameters:
    `propValue` - the property value object
    `propType` - the property type object
  Returns:
    true if the Object passed is a valid JposEntry property value of the type passed
  Since:
    2.0.0
  See Also:
    `JposEntryConst.PROP_TYPES`

### isValidPropType

    public static boolean isValidPropType(java.lang.Class propType)

  Returns:
    true if the propType object passed is a valid JposEntry property type that is one of the JposEntryConst.PROP_TYPES
  Since:
    2.0.0
  See Also:
    `JposEntryConst.PROP_TYPES`

### parsePropValue

    public static java.lang.Object parsePropValue(java.lang.String stringValue,
                                                  java.lang.Class propType)
                                           throws JposConfigException

  Parameters:
    `stringValue` - the String value to parse
    `propType` - the property value type
  Returns:
    the property value Object parsed from the String passed assuming that its of a valid property type and also that the string can be converted
  Throws:
    `JposConfigException` - if this property value cannot be created from the arguments passed
  Since:
    2.0.0
  See Also:
    `JposEntryConst.PROP_TYPES`

### propTypeFromString

    public static java.lang.Class propTypeFromString(java.lang.String typeString)
                                              throws JposConfigException

  Parameters:
    `typeString` - the type string name
  Returns:
    the Class type for the property from the typeString passed. The type string can either be the short name of the type or the fully-qualified class name
  Throws:
    `JposConfigException` - if the typeString is not a valid property type string

###

    static void ()

  Initializes the standard set of properties

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

This API and code belongs to the JavaPOS committee please see LISCENCE file for details