Class AbstractAttributeBagResource

    • Field Detail

      • entity

        protected List<Dom> entity
        A list of attributes in the service.
      • parent

        protected Dom parent
        The service containing the attributes.
      • tagName

        protected String tagName
        The getPropertiesName of the element the attributes are stored under.
    • Constructor Detail

      • AbstractAttributeBagResource

        public AbstractAttributeBagResource()
    • Method Detail

      • getDescriptionName

        public abstract String getDescriptionName()
      • getPropertiesName

        public abstract String getPropertiesName()
      • getnodeElementName

        public abstract String getnodeElementName()
      • getAllAttributes

        public abstract List<Map<String,​String>> getAllAttributes()
        Gets all of the attributes in the entity.
        Returns:
        a list of the attributes
      • get

        @GET
        @Produces({"text/html","application/json","application/xml"})
        public ActionReportResult get()
        Gets the attributes.
        Returns:
        a list of the attributes after the transaction.
      • put

        @PUT
        @Consumes({"application/json","application/xml","application/x-www-form-urlencoded"})
        @Produces({"text/html","application/json","application/xml"})
        public ActionReportResult put​(List<Map<String,​String>> attributes)
        Creates new attributes. This method deletes all of the existing attributes.
        Parameters:
        attributes - the list of attributes to be created.
        Returns:
        a list of the attributes after the transaction.
      • post

        @POST
        @Consumes({"application/json","application/xml","application/x-www-form-urlencoded"})
        @Produces({"text/html","application/json","application/xml"})
        public ActionReportResult post​(List<Map<String,​String>> attributes)
        Creates new attributes. Existing attributes will be ignored, and others will be created.
        Parameters:
        attributes - the list of attributes to be created.
        Returns:
        a list of the attributes after the transaction.
      • delete

        @DELETE
        @Produces({"text/html","application/json","application/xml"})
        public ActionReportResult delete()
        Deletes all attributes.
        Returns:
        a list of the attributes after the transaction.
      • setAttributes

        public void setAttributes​(List<Map<String,​String>> attributes)
                           throws TransactionFailure
        Sets the attribute list to the specified list.
        Parameters:
        attributes - the intended list of attributes.
        Throws:
        TransactionFailure - if an error occurs in removing or adding attributes.
      • setParentAndTagName

        public void setParentAndTagName​(Dom parent,
                                        String tagName)
        Sets the parent and the tag getPropertiesName of the resource. The Dom entity will be derived from this information.
        Parameters:
        parent -
        tagName -