Package com.basis.api.admin.internal
Class BBjAdminSimpleCommitPropWriter
java.lang.Object
com.basis.api.admin.internal.BBjAdminSimpleCommitPropWriter
- All Implemented Interfaces:
BBjAdminCommitPropertyWriter
,BBjAdminCommitWriter
,BBjAdminPropertyReader
,BBjAdminPropertyWriter
,Remote
- Direct Known Subclasses:
BBjAdminSimpleDatabase
-
Constructor Summary
ConstructorsConstructorDescriptionBBjAdminSimpleCommitPropWriter
(Map<String, Object> p_properties, Map<String, BBjAdminType> p_types, Set<String> p_readOnly, boolean p_canClear, boolean p_canAddNewProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addType
(String p_property, BBjAdminType p_type) Adds a type for the specified property if this object was created with the ability to add new properties.boolean
Is the user allowed to add new properties?boolean
canClear()
Is the user allowed to clear properties?protected boolean
checkPermission
(boolean p_write) boolean
checkValueEqual
(String p_property, Object p_value) Is the provided value equal to the current value (if any)?void
clear()
Clear all properties that are not read only.boolean
clearProperties
(Set<String> p_properties) Clear a set of properties.boolean
clearProperty
(String p_property) Clear out the value of a property.void
commit()
Commit all property changes.boolean
Does a given property exist?boolean
Do any of a set of properties exist?boolean
getBoolean
(String p_property) Get a boolean value for a property.Get the changed properties.Get the set of cleared properties.double
Get a double value for a property.int
Get an integer value for a property.Get a BBjAdminList value for a property.long
Get a long value for a property.Get the original properties list.Get a copy of all properties.Set the complete set of read-only properties.Get a String value for a property.Get the value type of a property.getTypes()
Get a copy of all of the type information.Get a object value for a property.boolean
Have properties been changed?boolean
isReadOnly
(String p_property) Is a given property read-only.void
void
rollback()
Roll back all property changes.void
setBoolean
(String p_property, boolean p_value) Set the boolean value of a property.void
Set the double value of a property.void
Set the integer value of a property.void
setList
(String p_property, BBjAdminList p_value) Set the BBjAdminList value of a property.void
Set the long value of a property.void
setProperties
(Map<String, Object> p_properties) Set properties as a group from a Map.void
Set the String value of a property.void
Set the object value of a property.
-
Constructor Details
-
BBjAdminSimpleCommitPropWriter
-
BBjAdminSimpleCommitPropWriter
public BBjAdminSimpleCommitPropWriter(BBjAdminCommitPropertyWriter p_commit) throws BBjAdminException - Throws:
BBjAdminException
-
-
Method Details
-
refresh
-
commit
Description copied from interface:BBjAdminCommitWriter
Commit all property changes.- Specified by:
commit
in interfaceBBjAdminCommitWriter
- Throws:
BBjAdminException
-
rollback
Description copied from interface:BBjAdminCommitWriter
Roll back all property changes. This will discard any changes that have been made in the properties and not committed.- Specified by:
rollback
in interfaceBBjAdminCommitWriter
- Throws:
BBjAdminException
-
clearProperty
Description copied from interface:BBjAdminPropertyWriter
Clear out the value of a property.- Specified by:
clearProperty
in interfaceBBjAdminPropertyWriter
- Parameters:
p_property
- Property name.- Returns:
- Whether the property existed.
- Throws:
BBjAdminException
-
isReadOnly
Description copied from interface:BBjAdminPropertyWriter
Is a given property read-only. By default they are _not_ read only.- Specified by:
isReadOnly
in interfaceBBjAdminPropertyWriter
- Parameters:
p_property
- Property name.- Throws:
BBjAdminException
- TODO
-
setBoolean
Description copied from interface:BBjAdminPropertyWriter
Set the boolean value of a property. This can fail if the property needs a specific type of value or is read-only.- Specified by:
setBoolean
in interfaceBBjAdminPropertyWriter
- Parameters:
p_property
- Property name.p_value
- New value for the property.- Throws:
BBjAdminException
-
setDouble
Description copied from interface:BBjAdminPropertyWriter
Set the double value of a property. This can fail if the property needs a specific type of value or is read-only.- Specified by:
setDouble
in interfaceBBjAdminPropertyWriter
- Parameters:
p_property
- Property name.p_value
- New value for the property.- Throws:
BBjAdminException
-
setInt
Description copied from interface:BBjAdminPropertyWriter
Set the integer value of a property. This can fail if the property needs a specific type of value or is read-only.- Specified by:
setInt
in interfaceBBjAdminPropertyWriter
- Parameters:
p_property
- Property name.p_value
- New value for the property.- Throws:
BBjAdminException
-
setLong
Description copied from interface:BBjAdminPropertyWriter
Set the long value of a property. This can fail if the property needs a specific type of value or is read-only.- Specified by:
setLong
in interfaceBBjAdminPropertyWriter
- Parameters:
p_property
- Property name.p_value
- New value for the property.- Throws:
BBjAdminException
-
setProperties
Description copied from interface:BBjAdminPropertyWriter
Set properties as a group from a Map.- Specified by:
setProperties
in interfaceBBjAdminPropertyWriter
- Parameters:
p_properties
- Properties to set.- Throws:
BBjAdminException
-
setString
Description copied from interface:BBjAdminPropertyWriter
Set the String value of a property. This can fail if the property needs a specific type of value or is read-only.- Specified by:
setString
in interfaceBBjAdminPropertyWriter
- Parameters:
p_property
- Property name.p_value
- New value for the property.- Throws:
BBjAdminException
-
setList
Description copied from interface:BBjAdminPropertyWriter
Set the BBjAdminList value of a property. This can fail if the property is read-only.- Specified by:
setList
in interfaceBBjAdminPropertyWriter
- Parameters:
p_property
- Property name.p_value
- New value for the property.- Throws:
BBjAdminException
-
setValue
Description copied from interface:BBjAdminPropertyWriter
Set the object value of a property. This can fail if the property needs a specific type of value or is read-only.- Specified by:
setValue
in interfaceBBjAdminPropertyWriter
- Parameters:
p_property
- Property name.p_value
- New value for the property.- Throws:
BBjAdminException
-
contains
Description copied from interface:BBjAdminPropertyReader
Does a given property exist?- Specified by:
contains
in interfaceBBjAdminPropertyReader
- Throws:
BBjAdminException
- TODO
-
contains
Description copied from interface:BBjAdminPropertyReader
Do any of a set of properties exist?- Specified by:
contains
in interfaceBBjAdminPropertyReader
- Throws:
BBjAdminException
- TODO
-
getBoolean
Description copied from interface:BBjAdminPropertyReader
Get a boolean value for a property.- Specified by:
getBoolean
in interfaceBBjAdminPropertyReader
- Parameters:
p_property
- Property name.- Returns:
- Boolean value for a property, some properties do not have an boolean value.
- Throws:
BBjAdminException
-
getDouble
Description copied from interface:BBjAdminPropertyReader
Get a double value for a property.- Specified by:
getDouble
in interfaceBBjAdminPropertyReader
- Parameters:
p_property
- Property name.- Returns:
- Double value for a property, some properties do not have a double value.
- Throws:
BBjAdminException
-
getInt
Description copied from interface:BBjAdminPropertyReader
Get an integer value for a property.- Specified by:
getInt
in interfaceBBjAdminPropertyReader
- Parameters:
p_property
- Property name.- Returns:
- Integer value for a property, some properties do not have an integer value.
- Throws:
BBjAdminException
-
getLong
Description copied from interface:BBjAdminPropertyReader
Get a long value for a property.- Specified by:
getLong
in interfaceBBjAdminPropertyReader
- Parameters:
p_property
- Property name.- Returns:
- Long value for a property, some properties do not have an long value.
- Throws:
BBjAdminException
-
getProperties
Description copied from interface:BBjAdminPropertyReader
Get a copy of all properties.- Specified by:
getProperties
in interfaceBBjAdminPropertyReader
- Throws:
BBjAdminException
- TODO
-
getString
Description copied from interface:BBjAdminPropertyReader
Get a String value for a property.- Specified by:
getString
in interfaceBBjAdminPropertyReader
- Parameters:
p_property
- Property name.- Returns:
- String value for a property, all property values can be retrieved as Strings.
- Throws:
BBjAdminException
-
getList
Description copied from interface:BBjAdminPropertyReader
Get a BBjAdminList value for a property.- Specified by:
getList
in interfaceBBjAdminPropertyReader
- Parameters:
p_property
- Property name.- Returns:
- BBjAdminList value for a property.
- Throws:
BBjAdminException
-
getType
Description copied from interface:BBjAdminPropertyReader
Get the value type of a property. The value type can be unknown.- Specified by:
getType
in interfaceBBjAdminPropertyReader
- Throws:
BBjAdminException
- TODO
-
getTypes
Description copied from interface:BBjAdminPropertyReader
Get a copy of all of the type information.- Specified by:
getTypes
in interfaceBBjAdminPropertyReader
- Throws:
BBjAdminException
- TODO
-
getValue
Description copied from interface:BBjAdminPropertyReader
Get a object value for a property.- Specified by:
getValue
in interfaceBBjAdminPropertyReader
- Parameters:
p_property
- Property name.- Returns:
- Boolean value for a property, some properties do not have an boolean value.
- Throws:
BBjAdminException
-
clear
Description copied from interface:BBjAdminPropertyWriter
Clear all properties that are not read only.- Specified by:
clear
in interfaceBBjAdminPropertyWriter
- Throws:
BBjAdminException
-
clearProperties
Description copied from interface:BBjAdminPropertyWriter
Clear a set of properties.- Specified by:
clearProperties
in interfaceBBjAdminPropertyWriter
- Parameters:
p_properties
- Property names.- Returns:
- Whether any of the properties has a non-null value.
- Throws:
BBjAdminException
-
canAddNewProperties
Description copied from interface:BBjAdminPropertyWriter
Is the user allowed to add new properties?- Specified by:
canAddNewProperties
in interfaceBBjAdminPropertyWriter
- Throws:
BBjAdminException
- TODO
-
canClear
Description copied from interface:BBjAdminPropertyWriter
Is the user allowed to clear properties?- Specified by:
canClear
in interfaceBBjAdminPropertyWriter
- Throws:
BBjAdminException
- TODO
-
hasChanged
Description copied from interface:BBjAdminPropertyWriter
Have properties been changed?- Specified by:
hasChanged
in interfaceBBjAdminPropertyWriter
- Throws:
BBjAdminException
- TODO
-
checkValueEqual
Description copied from interface:BBjAdminPropertyReader
Is the provided value equal to the current value (if any)?- Specified by:
checkValueEqual
in interfaceBBjAdminPropertyReader
- Throws:
BBjAdminException
- TODO
-
getReadOnly
Description copied from interface:BBjAdminPropertyWriter
Set the complete set of read-only properties.- Specified by:
getReadOnly
in interfaceBBjAdminPropertyWriter
- Throws:
BBjAdminException
- TODO
-
getClearedProperties
Description copied from interface:BBjAdminCommitPropertyWriter
Get the set of cleared properties.- Specified by:
getClearedProperties
in interfaceBBjAdminCommitPropertyWriter
- Throws:
BBjAdminException
- TODO
-
getChangedProperties
Description copied from interface:BBjAdminCommitPropertyWriter
Get the changed properties.- Specified by:
getChangedProperties
in interfaceBBjAdminCommitPropertyWriter
- Throws:
BBjAdminException
- TODO
-
getOriginalProperties
Description copied from interface:BBjAdminCommitPropertyWriter
Get the original properties list.- Specified by:
getOriginalProperties
in interfaceBBjAdminCommitPropertyWriter
- Throws:
BBjAdminException
- TODO
-
addType
Description copied from interface:BBjAdminPropertyWriter
Adds a type for the specified property if this object was created with the ability to add new properties.- Specified by:
addType
in interfaceBBjAdminPropertyWriter
- Throws:
BBjAdminException
-
checkPermission
protected boolean checkPermission(boolean p_write)
-