Class AbstractResourceWriter

  • All Implemented Interfaces:
    CodeWriter
    Direct Known Subclasses:
    CollectionResourceWriter, SingleResourceWriter

    @Deprecated
    public abstract class AbstractResourceWriter
    extends ClassWriter
    Deprecated.
    since 1818
    Abstract ClassWriter which covers general resource specific operations.

    A resource class must provide some typical properties/methods which are specified by this abstract class. These are in particular:

    • constructor without any parameter
    • readResource method
    • CRUD methods; with GET, PUT, POST, DELETE annotated methods
    • subresource locators, a Collection of methods which are returning possible subresources
    • Method Detail

      • getClassName

        public java.lang.String getClassName()
        Deprecated.
        Returns the simple class name of the resource which shall be generated.
        Overrides:
        getClassName in class ClassWriter
        Returns:
        resource class name
        See Also:
        ClassWriter.getClassName()
      • fill

        protected void fill()
        Deprecated.
        Overrides:
        fill in class ClassWriter
      • getConstructorMethodWriters

        protected java.util.Collection<MethodWriter> getConstructorMethodWriters()
        Deprecated.
        Returns the Constructor as MethodWriter. Default implementation is default constructor.
        Returns:
        MethodWriter
      • getCRUDMethodWriters

        protected java.util.Collection<MethodWriter> getCRUDMethodWriters()
        Deprecated.
        Returns supported CRUD operations as MethodWriter Collection
        Returns:
        Collection of MethodWriter
      • getSubResourceMethodWriters

        protected abstract java.util.Collection<MethodWriter> getSubResourceMethodWriters()
        Deprecated.
        Returns supported sub-resources as MethodWriter Collection
        Returns:
        Collection of MethodWriter
      • getResourceValueMethodWriters

        protected abstract java.util.Collection<MethodWriter> getResourceValueMethodWriters()
        Deprecated.
        Convenience Getter/Setter MethodWriter which delegates to AbstractResource#get/setResourceValue(...) but is named more user-friendly.
        Returns:
        Getter/Setter MethodWriter
      • getCustomMethodWriters

        protected java.util.Collection<MethodWriter> getCustomMethodWriters()
        Deprecated.
      • createDefaultConstructorMethodWriter

        protected MethodWriter createDefaultConstructorMethodWriter()
        Deprecated.
      • createGetMethodWriter

        protected abstract MethodWriter createGetMethodWriter()
        Deprecated.
      • createDeleteMethodWriter

        protected abstract MethodWriter createDeleteMethodWriter()
        Deprecated.
      • createPutMethodWriter

        protected abstract MethodWriter createPutMethodWriter()
        Deprecated.
      • createPostMethodWriter

        protected abstract MethodWriter createPostMethodWriter()
        Deprecated.
      • createResourceValueMethodWriters

        protected java.util.Collection<MethodWriter> createResourceValueMethodWriters​(java.lang.String valueType,
                                                                                      java.lang.String genericType,
                                                                                      java.lang.String name)
        Deprecated.
      • createCRUDMethodWriter

        protected MethodWriter createCRUDMethodWriter​(java.lang.String ano,
                                                      java.lang.String methodName)
        Deprecated.
        Creates a CRUD MethodWriter template.
        Parameters:
        ano - CRUD operation as annotation name
        methodName - CRUD method name
        Returns:
        MethodWriter
      • createReadResourceMethodWriter

        protected MethodWriter createReadResourceMethodWriter​(java.lang.String returnClassType)
        Deprecated.
      • createSubResourceMethodWriter

        protected MethodWriter createSubResourceMethodWriter​(ResourceConfig subResourceCfg,
                                                             boolean isSingleResource)
        Deprecated.