Class PropertyValueService
java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.CayenneService
com.avoka.fc.core.service.property.PropertyValueService
Provide a service for creating and updating property values.
Examples
Below is a Groovy Script example creating a "Product Reference Codes" client property to be used as reference data for pre-filling forms with.
import com.avoka.fc.core.service.property.PropertyValueService // Product reference codes XML def productRefCodes = "..." def propertyValueService = new PropertyValueService(); propertyValueService.createClientProperty("General Insurance", "Product Reference Codes", productRefCodes)
- Since:
- 3.6.4
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
createClientProperty
(String clientName, String propertyName, String propertyValue) Create or update client property value.boolean
createFormProperty
(String formCode, String propertyName, String propertyValue) Create or update form version property value.boolean
createPortalProperty
(String portalName, String propertyName, String propertyValue) Create or update portal property value.boolean
deleteClientProperty
(String clientName, String propertyName) Delete the client property if found and return true, otherwise return false.boolean
deleteFormProperty
(String formCode, String propertyName) Delete the form version property if found and return true, otherwise return false.boolean
deletePortalProperty
(String portalName, String propertyName) Delete the portal property if found and return true, otherwise return false.Methods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchEntity, refetchObject, registerNewObject, rollbackChanges, toMap, toMap
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
Constructor Details
-
PropertyValueService
public PropertyValueService()
-
-
Method Details
-
createClientProperty
Create or update client property value. If a property type with the given name is not defined then a new property type with the given name will be created. If the property value does not exist a new value will be created, otherwise an existing value will be update.- Parameters:
clientName
- the client organization unique name (required)propertyName
- the property type name, a new property type will be created if it doesn't already exist (required)propertyValue
- the value of the property to create or update (required)- Returns:
- true if a new property value was created, or false if an existing value was updated
-
createFormProperty
Create or update form version property value. If a property type with the given name is not defined then a new property type with the given name will be created. If the property value does not exist a new value will be created, otherwise an existing value will be update. The currently active form version will be property value will be updated or created.- Parameters:
formCode
- the unique form code identifier (required)propertyName
- the property type name, a new property type will be created if it doesn't already exist (required)propertyValue
- the value of the property to create or update (required)- Returns:
- true if a new property value was created, or false if an existing value was updated
-
createPortalProperty
Create or update portal property value. If a property type with the given name is not defined then a new property type with the given name will be created. If the property value does not exist a new value will be created, otherwise an existing value will be update.- Parameters:
portalName
- the unique portal name identifier (required)propertyName
- the property type name, a new property type will be created if it doesn't already exist (required)propertyValue
- the value of the property to create or update (required)- Returns:
- true if a new property value was created, or false if an existing value was updated
-
deleteClientProperty
Delete the client property if found and return true, otherwise return false.- Parameters:
clientName
- the client organization name (required)propertyName
- the property name (required)- Returns:
- true if the client property was deleted, or false if not found
- Since:
- 4.3.0
-
deleteFormProperty
Delete the form version property if found and return true, otherwise return false.- Parameters:
formCode
- the form code (required)propertyName
- the property name (required)- Returns:
- true if the form version property was deleted, or false if not found
- Since:
- 4.3.0
-
deletePortalProperty
Delete the portal property if found and return true, otherwise return false.- Parameters:
portalName
- the portal name (required)propertyName
- the property name (required)- Returns:
- true if the portal property was deleted, or false if not found
- Since:
- 4.3.0
-