Class ProfileConditionsSetInfoPO

java.lang.Object
ro.sync.ecss.conditions.ProfileConditionsSetInfoPO
All Implemented Interfaces:
Serializable, Cloneable, PersistentObject

@API(type=EXTENDABLE, src=PRIVATE) public class ProfileConditionsSetInfoPO extends Object implements PersistentObject
Contains information about a condition processing attribute name and possible values.
See Also:
  • Constructor Details

    • ProfileConditionsSetInfoPO

      public ProfileConditionsSetInfoPO()
      Constructor.
    • ProfileConditionsSetInfoPO

      public ProfileConditionsSetInfoPO(ro.sync.options.SerializableLinkedHashMap<String,String[]> conditions, String documentTypePattern, String conditionSetName)
      Constructor.
      Parameters:
      conditions - Map between attributes and profile values.
      documentTypePattern - Document type pattern (the conditions set will be used only for the document types that match it)
      conditionSetName - Condition set name.
    • ProfileConditionsSetInfoPO

      public ProfileConditionsSetInfoPO(ro.sync.options.SerializableLinkedHashMap<String,String[]> conditions, String documentTypePattern, String conditionSetName, String ditavalFile, boolean useDITAVAL)
      Constructor.
      Parameters:
      conditions - Map between attributes and profile values.
      documentTypePattern - Document type pattern (the conditions set will be used only for the document types that match it)
      conditionSetName - Condition set name.
      ditavalFile - The DITAVAL file used for the condition set. A profiling consition set can be based either on a set of user defined consitions or a DITAVAL file.
      useDITAVAL - true if the DITAVAL file should be used instead of the consitions set.
    • ProfileConditionsSetInfoPO

      public ProfileConditionsSetInfoPO(ro.sync.options.SerializableLinkedHashMap<String,String[]> conditions, String documentTypePattern, String conditionSetName, String ditavalFile, boolean useDITAVAL, String shortcut)
      Constructor.
      Parameters:
      conditions - Map between attributes and profile values.
      documentTypePattern - Document type pattern (the conditions set will be used only for the document types that match it)
      conditionSetName - Condition set name.
      ditavalFile - The DITAVAL file used for the condition set. A profiling consition set can be based either on a set of user defined consitions or a DITAVAL file.
      useDITAVAL - true if the DITAVAL file should be used instead of the consitions set.
      shortcut - The condition set shortcut.
  • Method Details

    • setConditions

      public void setConditions(ro.sync.options.SerializableLinkedHashMap<String,String[]> conditions)
      Parameters:
      conditions - The conditions to set.
    • getConditions

      public Map<String,String[]> getConditions()
      Returns:
      Returns the conditions.
    • setDocumentTypePattern

      public void setDocumentTypePattern(String documentTypePattern)
      Parameters:
      documentTypePattern - The documentTypePattern to set.
    • getDocumentTypePattern

      public String getDocumentTypePattern()
      Returns:
      Returns the documentTypePattern.
    • setConditionSetName

      public void setConditionSetName(String conditionSetName)
      Parameters:
      conditionSetName - The conditionSetName to set.
    • getConditionSetName

      public String getConditionSetName()
      Returns:
      Returns the conditionSetName.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • checkValid

      public void checkValid() throws InvalidPersistentObjException
      Description copied from interface: PersistentObject
      Check if object is valid to be used. Method is called after it is deserialized from options. If not then throw an InvalidPersistentObjException exception.
      Specified by:
      checkValid in interface PersistentObject
      Throws:
      InvalidPersistentObjException - Thrown when instance is not valid.
      See Also:
    • getNotPersistentFieldNames

      public String[] getNotPersistentFieldNames()
      Specified by:
      getNotPersistentFieldNames in interface PersistentObject
      Returns:
      The names of the field from this object which should not be serialized.
      See Also:
    • clone

      public Object clone()
      Description copied from interface: PersistentObject
      Forces all the persistent objects to be cloneable.
      Specified by:
      clone in interface PersistentObject
      Overrides:
      clone in class Object
      Returns:
      A clone of this object. The clone and the original are disjunct. They share only immutable objects, like Strings, Integers, etc.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      See Also:
    • getDITAVALFile

      public String getDITAVALFile()
      Return the DITAVAL location.
      Returns:
      The DITAVAL location. It can be null.
    • setDitavalFile

      public void setDitavalFile(String ditavalFile)
      Set the DITAVAL location.
      Parameters:
      ditavalFile - The DITAVAL location to set.
    • useDITAVAL

      public boolean useDITAVAL()
      Returns:
      true if the DITAVAL file should be used instead of the conditions set.
    • setUseDITAVAL

      public void setUseDITAVAL(boolean useDITAVAL)
      Parameters:
      useDITAVAL - True if the condition set is using a DITAVAL file instead of the conditions set.
    • getShortcut

      public String getShortcut()
      Get the condition set shortcut.
      Returns:
      Returns the condition set shortcut.
    • setShortcut

      public void setShortcut(String shortcut)
      Set the condition set shortcut.
      Parameters:
      shortcut - The shortcut to set.