com.crystaldecisions.sdk.properties
Interface IProperties

All Superinterfaces:
java.util.Map
All Known Subinterfaces:
IMappedAttributes

public interface IProperties
extends java.util.Map

This interface defines a collection of properties.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry
 
Method Summary
 IProperty add(java.lang.Object id, java.lang.Object value, int flags)
           Adds a new property to the collection.
 IProperties addProperties(java.lang.Object id)
           Adds a new empty property bag to the collection.
 IProperties copyAll()
           Return a copy of this properties(deep copy).
 boolean getBoolean(java.lang.Object id)
           Returns the boolean value of the specified property.
 java.util.Date getDate(java.lang.Object id)
           Returns the Date value of the specified property.
 int getInt(java.lang.Object id)
           Returns the int value of the specified property.
 long getLong(java.lang.Object id)
           Returns the long value of the specified property.
 IProperties getProperties(java.lang.Object id)
           Return the property bag of the specified id.
 IProperties getProperties(java.lang.Object id, boolean createIfNotExist)
           Return the property bag of the specified id.
 IProperty getProperty(java.lang.Object id)
           Returns the specified property if the property exists, null otherwise.
 java.lang.String getString(java.util.Locale locale)
           Returns String value of the locale is the key identifying the string to retrieve.
 java.lang.String getString(java.util.Locale loc, java.util.Locale fallbackLocale, java.lang.String defaultValue)
           Returns String value of the locale is the key identifying the string to retrieve if the specified locale string is not found, use fallbackLocale instead, if still not found, defaultValue is returned.
 java.lang.String getString(java.lang.Object id)
           Returns the string value of the specified property.
 java.lang.Object removeLocal(java.lang.Object key)
           
 void setProperty(java.lang.Object id, boolean value)
           Sets the property's value as a boolean.
 void setProperty(java.lang.Object id, int value)
           Sets the property's value as an int.
 void setProperty(java.lang.Object id, long value)
           Sets the property's value as a long.
 void setProperty(java.lang.Object id, java.lang.Object value)
           Sets the property's value.
 void setString(java.util.Locale locale, java.lang.String message)
           Set a string into the current property bag and use locale as the key.
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

add

IProperty add(java.lang.Object id,
              java.lang.Object value,
              int flags)

Adds a new property to the collection. You can use the flag to mark the property as read-only, binary, changed, and so on. If you do not want the property to be marked with a flag, set the flag as 0. For a list of valid flags, refer to IProperty. If the flag is set to IProperty.BAG, a new, empty property bag is added.

Parameters:
id - The ID of the property.
value - The value of the property to be added.
flags - The flag to be used.
Returns:
An IProperty object containing the requested property.
See Also:

addProperties

IProperties addProperties(java.lang.Object id)

Adds a new empty property bag to the collection. This is similar to use add with flag set to IProperty.BAG.

Parameters:
id - The ID of the propertybag.
Returns:
An IProperties object returned.

getProperty

IProperty getProperty(java.lang.Object id)

Returns the specified property if the property exists, null otherwise.

Parameters:
id - The ID of the property to be returned.
Returns:
An IProperty object containing the value of the property, or null if the property does not exist.

getString

java.lang.String getString(java.lang.Object id)

Returns the string value of the specified property.

Returns:
A String containing the value of the property, or null if the property does not exist.

getInt

int getInt(java.lang.Object id)

Returns the int value of the specified property.

Returns:
An int containing the value of the property, or 0 if the property does not exist.

getDate

java.util.Date getDate(java.lang.Object id)

Returns the Date value of the specified property.

Returns:
A Date object containing the value of the property, or null if the property does not exist.

getBoolean

boolean getBoolean(java.lang.Object id)

Returns the boolean value of the specified property.

Returns:
A boolean containing the value of the property, or false if the property does not exist.

getLong

long getLong(java.lang.Object id)

Returns the long value of the specified property.

Returns:
A long containing the value of the property, or 0 if the property does not exist.

getString

java.lang.String getString(java.util.Locale locale)
                           throws SDKException

Returns String value of the locale is the key identifying the string to retrieve.

Returns:
A String containing the value of the property, or null if the property does not exist.
Throws:
SDKException

getString

java.lang.String getString(java.util.Locale loc,
                           java.util.Locale fallbackLocale,
                           java.lang.String defaultValue)

Returns String value of the locale is the key identifying the string to retrieve if the specified locale string is not found, use fallbackLocale instead, if still not found, defaultValue is returned.

Returns:
A String containing the value of the property, or null if the property does not exist.

setString

void setString(java.util.Locale locale,
               java.lang.String message)

Set a string into the current property bag and use locale as the key.

Parameters:
locale - key of the message in the current property bag.
message - the string value .

getProperties

IProperties getProperties(java.lang.Object id)

Return the property bag of the specified id.

Parameters:
id - The ID of the properties to be returned.
Returns:
IProperties if the bag exists, null otherwise.

getProperties

IProperties getProperties(java.lang.Object id,
                          boolean createIfNotExist)

Return the property bag of the specified id.

Parameters:
id - The ID of the properties to be returned.
createIfNotExists - A boolean indicate whether a bag should be created if specified ID is not found. True creates a bag, False won't.
Returns:
IProperties if the bag exists, null otherwise if createIfNotExists is false, new bag if createIfNotExists is true.

setProperty

void setProperty(java.lang.Object id,
                 java.lang.Object value)

Sets the property's value.

Parameters:
id - The ID of the property to be set.
value - The value that the property should be set to.

setProperty

void setProperty(java.lang.Object id,
                 int value)

Sets the property's value as an int.

Parameters:
id - The ID of the property to be set.
value - The value that the property should be set to.

setProperty

void setProperty(java.lang.Object id,
                 long value)

Sets the property's value as a long.

Parameters:
id - The ID of the property to be set.
value - The value that the property should be set to.

setProperty

void setProperty(java.lang.Object id,
                 boolean value)

Sets the property's value as a boolean.

Parameters:
id - The ID of the property to be set.
value - The value that the property should be set to.

removeLocal

java.lang.Object removeLocal(java.lang.Object key)

copyAll

IProperties copyAll()

Return a copy of this properties(deep copy).

Returns:
Return a copy of this properties(deep copy).