pairs
The key being a String and the value any serializable Java objects
NOTE: JposEntry implementation can be easily implemented using a
java.util.Hashtable
- Since:
- 0.1 (Philly 99 meeting)
- Author:
- E. Michael Maximilien (maxim@us.ibm.com)
Inner Class Summary |
static interface |
JposEntry.Prop
Inner interface to represent a property of a JposEntry |
Methods inherited from interface java.lang.Comparable |
compareTo |
SI_FACTORY_CLASS_PROP_NAME
public static final java.lang.String SI_FACTORY_CLASS_PROP_NAME
- JposEntry property name defining the JposServiceInstanceFactory class for this JposEntry
- Since:
- 0.1 (Philly 99 meeting)
LOGICAL_NAME_PROP_NAME
public static final java.lang.String LOGICAL_NAME_PROP_NAME
- JposEntry property name that must be defined by all JposEntry objects used to create services
- Since:
- 0.1 (Philly 99 meeting)
SERVICE_CLASS_PROP_NAME
public static final java.lang.String SERVICE_CLASS_PROP_NAME
- JposEntry property name that specifies the fully qualified class name for the service
- Since:
- 1.2 (NY 2K meeting)
VENDOR_NAME_PROP_NAME
public static final java.lang.String VENDOR_NAME_PROP_NAME
- The vendor name string
- Since:
- 1.2 (NY 2K meeting)
VENDOR_URL_PROP_NAME
public static final java.lang.String VENDOR_URL_PROP_NAME
- The vendor URL string
- Since:
- 1.2 (NY 2K meeting)
DEVICE_CATEGORY_PROP_NAME
public static final java.lang.String DEVICE_CATEGORY_PROP_NAME
- The device category for the service must be one of JavaPOS defined categories
i.e. CashDrawer, CashChanger, MSR, MICR, ...
- Since:
- 1.2 (NY 2K meeting)
JPOS_VERSION_PROP_NAME
public static final java.lang.String JPOS_VERSION_PROP_NAME
- The JavaPOS version supported by this service (i.e. 1.4, 1.5...)
- Since:
- 1.2 (NY 2K meeting)
PRODUCT_NAME_PROP_NAME
public static final java.lang.String PRODUCT_NAME_PROP_NAME
- A short name for this product
- Since:
- 1.2 (NY 2K meeting)
PRODUCT_DESCRIPTION_PROP_NAME
public static final java.lang.String PRODUCT_DESCRIPTION_PROP_NAME
- A string description for this product
- Since:
- 1.2 (NY 2K meeting)
PRODUCT_URL_PROP_NAME
public static final java.lang.String PRODUCT_URL_PROP_NAME
- The product's URL string
- Since:
- 1.2 (NY 2K meeting)
getPropertyCount
public int getPropertyCount()
- Returns:
- count of number of properties
- Since:
- 0.1 (Philly 99 meeting)
getPropertyNames
public java.util.Enumeration getPropertyNames()
- Returns:
- an enumerator for the properties names
- Since:
- 0.1 (Philly 99 meeting)
hasPropertyWithName
public boolean hasPropertyWithName(java.lang.String propName)
- Parameters:
propName
- the property name String- Returns:
- true if there is a property by the name specified
- Since:
- 0.1 (Philly 99 meeting)
hasPropertyWithValue
public boolean hasPropertyWithValue(java.lang.Object propValue)
- Parameters:
propValue
- the property's value Object- Returns:
- true if there is a property by the value specified
NOTE: Object.equals method will be used to compare
- Since:
- 0.1 (Philly 99 meeting)
getPropertyValue
public java.lang.Object getPropertyValue(java.lang.String propName)
- Parameters:
propName
- the property's name String- Returns:
- the property's value Object
- Since:
- 0.1 (Philly 99 meeting)
getPropertyType
public java.lang.Class getPropertyType(java.lang.String propName)
- Parameters:
propName
- the property's name String- Returns:
- the property's type
- Since:
- 2.0.0
modifyPropertyValue
public java.lang.Object modifyPropertyValue(java.lang.String propName,
java.lang.Object propValue)
throws java.lang.IllegalArgumentException
- Modifies the property value of the property passed
- Parameters:
propName
- the property namepropValue
- the new property value- Returns:
- the oldPropValue or null if this property does not exist
- Throws:
java.lang.IllegalArgumentException
- if the propName or propValue is null- Since:
- 1.3 (Tokyo 2001 meeting)
addProperty
public java.lang.Object addProperty(java.lang.String propName,
java.lang.Object propValue)
throws java.lang.IllegalArgumentException
- Adds a property to the JposEntry object.
NOTE: any property with the same name gets overlaid
- Parameters:
propName
- the name of this property (should be unique per property)propValue
- the properties value Object- Throws:
java.lang.IllegalArgumentException
- if the propName or propValue is null- Since:
- 0.1 (Philly 99 meeting)
removeProperty
public java.lang.Object removeProperty(java.lang.String propName)
- Looks for a property with name specified and removes it
- Parameters:
propName
- the name String of the property to remove- Since:
- 0.1 (Philly 99 meeting)
equals
public boolean equals(JposEntry otherEntry)
- Returns:
- true if the two JposEntries have the same properties
- Since:
- 0.1 (Philly 99 meeting)
getRegPopulator
public JposRegPopulator getRegPopulator()
- Returns:
- the JposRegPopulator that loads/saves this entry. If null the default
populator is used
- Since:
- 1.3 (Washington DC 2001 meeting)
getLogicalName
public java.lang.String getLogicalName()
- Returns:
- the logical name for this JposEntry. This is a shortcut for easily getting
the logical name vs getting a property and passing the logical name constant
- Since:
- 1.3 (Washington DC 2001 meeting)
- See Also:
getPropertyValue(java.lang.String)
,
LOGICAL_NAME_PROP_NAME
getProp
public JposEntry.Prop getProp(java.lang.String propName)
- Returns a JposEntry.Prop with name specified.
Changes to that property object are not reflected in this entry. You must
apply the changes to the property to the entry by calling modifyProp() method
- Parameters:
propName
- the property name- Returns:
- the JposEntry.Prop with name specified or null if no such property exist
- Since:
- 2.0.0
getProps
public java.util.Iterator getProps()
- Returns an Iterator of JposEntry.Prop in this entry
Changes to any of the returned property object are not reflected in this entry.
You must apply the changes to the property to the entry by calling modifyProp() method
- Returns:
- an Iterator over the properties in this JposEntry as JposEntry.Prop objects
- Since:
- 1.3 (Washington DC 2001)
add
public void add(JposEntry.Prop prop)
throws java.lang.IllegalArgumentException
- Adds a new property
- Parameters:
prop
- the JposEntry.Prop to add- Throws:
java.lang.IllegalArgumentException
- if the prop is null- Since:
- 1.3 (Washington DC 2001 meeting)
remove
public void remove(JposEntry.Prop prop)
- Looks for a property with name specified and removes it. If none exist then
does nothing and return null
- Parameters:
name
- the name String of the property to remove- Returns:
- the value for the name passed
- Since:
- 0.1 (Philly 99 meeting)
modify
public void modify(JposEntry.Prop prop)
throws java.lang.IllegalArgumentException
- Modifies the property with name of property passed with the new value if
that property currently exist in the entry otherwise does nothing
- Parameters:
prop
- the JposEntry.Prop to modify- Throws:
java.lang.IllegalArgumentException
- if the prop is null- Since:
- 2.0.0
hasProp
public boolean hasProp(JposEntry.Prop prop)
- Parameters:
prop
- the JposEntry.Prop to check for- Returns:
- true if this entry has the property passed
- Since:
- 1.3 (Washington DC 2001 meeting)
createProp
public JposEntry.Prop createProp(java.lang.String propName,
java.lang.Object propValue,
java.lang.Class propType)
throws JposConfigException
- Parameters:
propName
- the property namepropValue
- the property valuepropType
- the property type (valid for this value)- Returns:
- a JposEntry.Prop object created with the tripplet
passed as arguments
- Throws:
JposConfigException
- if any of the argument is null or the
property value and type mismatch or this is not a valid property type- Since:
- 2.0.0
- See Also:
JposEntryConst.PROP_TYPES
This API and code belongs to the JavaPOS committee please see LISCENCE file for details