psdi.webclient.system.controller

Class Property

  • java.lang.Object
    • psdi.webclient.system.controller.Property
  • All Implemented Interfaces:
    java.lang.Cloneable


    @TraceDisabled
    public class Property
    extends java.lang.Object
    implements java.lang.Cloneable
    class used to wrap property values and provide an additional long value which can be used to set additional boolean values on the property. The standard get and put routines for the parent classes hashmap are overridden to hide this implementation detail; this class is never exposed publicly to any functions.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Property(Property prop)
      Constructor taking the property object
      Property(java.lang.String name)
      Constructor taking the property/value
      Property(java.lang.String name, java.lang.String value)
      Constructor taking the property/value
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      void clearFlag(long index)
      Clears the bit(s) indicated by index to false
      void clearFlags()
      Sets flags back to 0 to clear all set flags
      java.lang.Object clone() 
      java.lang.String getDefaultValue() 
      boolean getFlag(long index)
      Returns boolean whether the flag set at index is set
      long getFlags() 
      java.lang.String getName() 
      java.util.List getParameterList() 
      java.lang.String getString(java.lang.String property)
      Returns the string value for the property, if present
      java.lang.String getTranslatable(WebClientSession sc, java.lang.String controlId, java.lang.String property)
      Returns the proper translated string for the given property.
      java.lang.String getTranslatable(WebClientSession sc, java.lang.String controlId, java.lang.String property, java.lang.String defaultValue)
      Returns the proper translated string for the given property.
      java.lang.String getValue() 
      java.lang.String getValue(java.util.List paramValues) 
      boolean isParameterized() 
      void setDetaultValue(java.lang.String val) 
      void setFlag(long index)
      Sets the bit(s) indicated by index to true
      void setFlagFromString(java.lang.String flag)
      Set the corresponding flag
      void setFlags(long flags) 
      void setFlagsFromString(java.lang.String flags)
      Deprecated. 
      FIREFOX - flags no longer set as a lot, see BaseDescriptor.loadProperties(Element)
      void setName(java.lang.String name)
      Sets the property value
      void setRegexPattern(java.lang.String regex)
      Sets a regular expression to be used in with parametrized properties
      void setValue(java.lang.String value)
      Sets the property value
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • LABEL_SOURCE_ID

        public static final java.lang.String LABEL_SOURCE_ID
        Name of the property which holds the id of original control that labels are for.
        See Also:
        Constant Field Values
      • name

        protected java.lang.String name
      • value

        protected java.lang.String value
      • flags

        protected long flags
      • defaultValue

        protected java.lang.String defaultValue
    • Constructor Detail

      • Property

        public Property(java.lang.String name)
        Constructor taking the property/value
        Parameters:
        property - Property name to be used at the key in the hashmap
        value - Value to be stored
      • Property

        public Property(java.lang.String name,
                        java.lang.String value)
        Constructor taking the property/value
        Parameters:
        property - Property name to be used at the key in the hashmap
        value - Value to be stored
      • Property

        public Property(Property prop)
        Constructor taking the property object
        Parameters:
        prop - Property to be copied
    • Method Detail

      • setFlag

        public void setFlag(long index)
        Sets the bit(s) indicated by index to true
        Parameters:
        index - bit(s) to be set
      • setFlags

        public void setFlags(long flags)
      • setValue

        public void setValue(java.lang.String value)
        Sets the property value
        Parameters:
        value - object to be set as the value
      • getValue

        public java.lang.String getValue()
      • setDetaultValue

        public void setDetaultValue(java.lang.String val)
      • getDefaultValue

        public java.lang.String getDefaultValue()
      • setName

        public void setName(java.lang.String name)
        Sets the property value
        Parameters:
        value - object to be set as the value
      • getName

        public java.lang.String getName()
      • clearFlags

        public void clearFlags()
        Sets flags back to 0 to clear all set flags
      • clearFlag

        public void clearFlag(long index)
        Clears the bit(s) indicated by index to false
        Parameters:
        index - bit(s) to be set
      • getFlag

        public boolean getFlag(long index)
        Returns boolean whether the flag set at index is set
        Parameters:
        index - bit(s) to get value for
        Returns:
        true if bit(s) are true, false otherwise
      • getFlags

        public long getFlags()
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException
      • setFlagsFromString

        public void setFlagsFromString(java.lang.String flags)
        Deprecated. FIREFOX - flags no longer set as a lot, see BaseDescriptor.loadProperties(Element)
        utility method that takes a property name and a string of comma delimited property flags. It will parse the string and set all of the associated flags. The xref for the strings and flags is maintained in the flagtable array in this class.
        Parameters:
        flags - String containing zero or more comma delimited flags
      • setFlagFromString

        public void setFlagFromString(java.lang.String flag)
        Set the corresponding flag
        Parameters:
        flag - String representation of one flag to be set
      • isParameterized

        public boolean isParameterized()
      • getValue

        public java.lang.String getValue(java.util.List paramValues)
      • getParameterList

        public java.util.List getParameterList()
      • setRegexPattern

        public void setRegexPattern(java.lang.String regex)
        Sets a regular expression to be used in with parametrized properties
        Parameters:
        regex - the regular expression to be used instead of the default
      • getTranslatable

        public java.lang.String getTranslatable(WebClientSession sc,
                                                java.lang.String controlId,
                                                java.lang.String property)
        Returns the proper translated string for the given property. It tries to retrieve the value from the cached localized, then the system label cache, otherwise from the control properties themselves.
        Parameters:
        sc - The current session context
        property - Property or attribute to get the string for
        Returns:
        The value for the property, or empty string if not found
      • getTranslatable

        public java.lang.String getTranslatable(WebClientSession sc,
                                                java.lang.String controlId,
                                                java.lang.String property,
                                                java.lang.String defaultValue)
        Returns the proper translated string for the given property. It tries to retrieve the value from the cached localized, then the system label cache, otherwise from the control properties themselves. If still not found, then returns the defaultValue
        Parameters:
        sc - The current session context
        property - Property or attribute to get the string for
        defaultValue - default value to use if string not found
        Returns:
        The value for the property, or default value if not found
      • getString

        public java.lang.String getString(java.lang.String property)
        Returns the string value for the property, if present
        Parameters:
        property - Property or attribute to get the string for
        Returns:
        The value for the property, or empty string "" if no value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object