Class Capability


  • public class Capability
    extends java.lang.Object
    A class representing whether a certain operation can be supported based on the current state of the object upon which the action is taken. For instance, a Capability instance returned from a Conference object may indicate whether the conference call can support muting of a selected participant, based on the participant control capabilities of the conferencing system and the current role of the local user.
    • Constructor Detail

      • Capability

        public Capability()
        Constructor for being allowed.
      • Capability

        public Capability​(CapabilityDenialReason reason)
        Constructor for not being allowed.
        Parameters:
        reason - Reason for why the capability this object is associated with is not available for use.
      • Capability

        public Capability​(boolean allowed,
                          CapabilityDenialReason reason)
        Constructor
        Parameters:
        allowed - Specify whether allowed or not
        reason - Reason for why the capability this object is associated with is not available for use.
    • Method Detail

      • isAllowed

        public boolean isAllowed()
        Returns:
        Whether the associated operation is allowed
      • getDenialReason

        public CapabilityDenialReason getDenialReason()
        Returns the reason for not allowing the associated operation. Calling this method when isAllowed() returns false is not useful. In this case, the method returns CapabilityDenialReason.ALLOWED.
        Returns:
        Reason for not allowing the associated operation.
      • equals

        public boolean equals​(java.lang.Object object)
        Returns whether two objects are equal or not
        Overrides:
        equals in class java.lang.Object
        Parameters:
        object - Input object
        Returns:
        true of the objects are equal; false, otherwise.
      • hashCode

        public int hashCode()
        Returns hash code associated with the object instance.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hash code value.
      • toString

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