Class PropertyValueService


public class PropertyValueService extends CayenneService
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 Details

    • PropertyValueService

      public PropertyValueService()
  • Method Details

    • createClientProperty

      public boolean createClientProperty(String clientName, String propertyName, String propertyValue)
      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

      public boolean createFormProperty(String formCode, String propertyName, String propertyValue)
      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

      public boolean createPortalProperty(String portalName, String propertyName, String propertyValue)
      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

      public boolean deleteClientProperty(String clientName, String propertyName)
      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

      public boolean deleteFormProperty(String formCode, String propertyName)
      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

      public boolean deletePortalProperty(String portalName, String propertyName)
      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