Class JavaEEResourceBase

    • Constructor Detail

      • JavaEEResourceBase

        public JavaEEResourceBase​(ResourceInfo resourceInfo)
    • Method Detail

      • setEnabled

        public void setEnabled​(boolean value)
        Description copied from interface: JavaEEResource
        Sets whether the resource is enabled.

        A resource can exist but be disabled, in which case references if an application is deployed that references it will deploy without errors, but when it is looked up a NamingException will be thrown

        Specified by:
        setEnabled in interface JavaEEResource
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: JavaEEResource
        Checks whether the resource is enabled.

        A resource can exist but be disabled, in which case references if an application is deployed that references it will deploy without errors, but when it is looked up a NamingException will be thrown

        Specified by:
        isEnabled in interface JavaEEResource
        Returns:
      • getType

        public abstract int getType()
        Description copied from interface: JavaEEResource
        Resource type. Defined above. Immutable.
        Specified by:
        getType in interface JavaEEResource
        Returns:
      • getProperties

        public Set getProperties()
        Description copied from interface: JavaEEResource
        Set containing elements of type ResourceProperty. Actual property names are resource type specific.
        Specified by:
        getProperties in interface JavaEEResource
        Returns:
        Shallow copy of resource property set. If resource has 0 properties, empty set is returned.
      • addProperty

        public void addProperty​(ResourceProperty property)
        Description copied from interface: JavaEEResource
        Add a property. Underlying set is keyed by property name. The new property overrides any existing property with same name.
        Specified by:
        addProperty in interface JavaEEResource
      • removeProperty

        public boolean removeProperty​(ResourceProperty property)
        Description copied from interface: JavaEEResource
        Remove a property. Underlying set is keyed by property name.
        Specified by:
        removeProperty in interface JavaEEResource
        Returns:
        true if property was removed, false if property was not found
      • getPropsString

        protected String getPropsString()
        Gets a the of properties as a JSON array i.e. [ propname1=value , propname2=othervalue ]

        If there are no properties an empty string is returned.

        Returns: