Interface WebProperty

  • All Known Subinterfaces:
    RWFormatProperty, WebPropertyObj

    public interface WebProperty
    WebProperty represents a property, which is an item in WebPropertySet. It is not a first class concept in MetaData, so it tightly linked to a WebPropertySet. This interface provides the ability to retrieve the property information about this property. Also provides the method to save the changed information back to MetaData.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getDefaultValue()
      Return the default value for this WebProperty.
      int getID()
      Return the ID information of this WebProperty.
      java.lang.String getName()
      Return the name of this WebProperty.
      int getType()
      Return the type of this WebProperty.
      boolean getUseDefault()
      Return whether current WebProperty using the default value in MetaData.
      java.lang.String getValue()
      Return the value of this WebProperty.
      boolean isDirty()
      Return true if this WebProperty has been changed since first time initialization or last time saving.
      void save()
      Save the change back to MetaData.
      void save​(WebIServerSession session)
      Saves changes back to the MetaData using the specified session.
      void setUseDefault​(boolean useDefault)
      Set this WebProperty to use the default value in MetaData or not.
      void setValue​(java.lang.String value)
      Set the value of this WebProperty.
    • Method Detail

      • getID

        int getID()
        Return the ID information of this WebProperty.
        Returns:
        The integer value of the ID, corresponding to the attribute "pri" of "property" node.
      • getName

        java.lang.String getName()
        Return the name of this WebProperty.
        Returns:
        The name of this WebProperty, corresponding to the attribute "n" of "property" node.
      • getType

        int getType()
        Return the type of this WebProperty. The value is from the enumeration EnumVariantTypes
        Returns:
        The type of this WebProperty, corresponding to the attribute "dt" of "property" node.
      • getUseDefault

        boolean getUseDefault()
        Return whether current WebProperty using the default value in MetaData. It is corresponding to the "pru" attribute of "property" node.
        Returns:
        True If current WebProperty using the default value in Metadata for this property, else false.
        See Also:
        setUseDefault(boolean)
      • setUseDefault

        void setUseDefault​(boolean useDefault)
                    throws java.lang.UnsupportedOperationException
        Set this WebProperty to use the default value in MetaData or not.
        Parameters:
        useDefault - If it is true, then this WebProperty should use the default value ("pdv" attribute), else it should use the value ("v" attribute). This setting corresponds to "pru" attribute of "property" node.
        Throws:
        java.lang.UnsupportedOperationException
        See Also:
        getUseDefault()
      • getDefaultValue

        java.lang.String getDefaultValue()
        Return the default value for this WebProperty.
        Returns:
        The String representation of the default value, corresponding to the attribute "pdv" of "property" node.
      • getValue

        java.lang.String getValue()
        Return the value of this WebProperty.
        Returns:
        The String representation of the value of this WebProperty, corresponding to the attribute "v" of "property" node.
        See Also:
        setValue(java.lang.String)
      • setValue

        void setValue​(java.lang.String value)
               throws java.lang.UnsupportedOperationException
        Set the value of this WebProperty.
        Parameters:
        value - The String representation of the value to be set, corresponding to the "v" attribute of "property" node.
        Throws:
        java.lang.UnsupportedOperationException
        See Also:
        getValue()
      • isDirty

        boolean isDirty()
        Return true if this WebProperty has been changed since first time initialization or last time saving.
        Returns:
        True if this WebProperty has been changed since the initialization or last time saving. Else, return false.
      • save

        void save()
           throws WebObjectsException
        Save the change back to MetaData. If there is no change since initialization or last time saving, do nothing.
        Throws:
        WebObjectsException - If there is anything wrong during the saving process, an exception of WebObjectsException will be thrown.
      • save

        void save​(WebIServerSession session)
           throws WebObjectsException
        Saves changes back to the MetaData using the specified session. Required if a given WebProperty is cached across multiple sessions.
        Parameters:
        session - session used to perform the save.
        Throws:
        WebObjectsException - thrown if an error occurs during the saving process.
        Since:
        MicroStrategy Web 9.0.0