java.lang.Object
de.hybris.bootstrap.codegenerator.AbstractImportProvider
de.hybris.bootstrap.codegenerator.ClassWriter
de.hybris.bootstrap.codegenerator.platformwebservices.resource.AbstractResourceWriter
All Implemented Interfaces:
CodeWriter
Direct Known Subclasses:
CollectionResourceWriter, SingleResourceWriter

@Deprecated(since="1818", forRemoval=true) public abstract class AbstractResourceWriter extends ClassWriter
Deprecated, for removal: This API element is subject to removal in a future version.
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
  • Field Details

    • WS_GET

      protected static final String WS_GET
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • WS_PUT

      protected static final String WS_PUT
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • WS_POST

      protected static final String WS_POST
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • WS_DELETE

      protected static final String WS_DELETE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • WS_RESPONSE

      protected static final String WS_RESPONSE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • WS_PATH

      public static final String WS_PATH
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • WS_PATHPARAM

      public static final String WS_PATHPARAM
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • ABSTRACT_YRESOURCE

      protected static final String ABSTRACT_YRESOURCE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • READRESOURCE_METHOD

      protected static final String READRESOURCE_METHOD
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details

    • AbstractResourceWriter

      protected AbstractResourceWriter(ResourceConfig cfg, CodeGenerator gen, YExtension ext)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getClassName

      public String getClassName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the simple class name of the resource which shall be generated.
      Overrides:
      getClassName in class ClassWriter
      Returns:
      resource class name
      See Also:
    • getResourceConfig

      protected ResourceConfig getResourceConfig()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the ResourceConfig which is used for specific generation information.
      Returns:
      ResourceConfig
    • fill

      protected void fill()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      fill in class ClassWriter
    • getConstructorMethodWriters

      protected Collection<MethodWriter> getConstructorMethodWriters()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the Constructor as MethodWriter. Default implementation is default constructor.
      Returns:
      MethodWriter
    • getCRUDMethodWriters

      protected Collection<MethodWriter> getCRUDMethodWriters()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns supported CRUD operations as MethodWriter Collection
      Returns:
      Collection of MethodWriter
    • getSubResourceMethodWriters

      protected abstract Collection<MethodWriter> getSubResourceMethodWriters()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns supported sub-resources as MethodWriter Collection
      Returns:
      Collection of MethodWriter
    • getReadResourceMethodWriter

      protected abstract MethodWriter getReadResourceMethodWriter()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the 'readResource' MethodWriter.
      Returns:
      MethodWriter
    • getResourceValueMethodWriters

      protected abstract Collection<MethodWriter> getResourceValueMethodWriters()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Convenience Getter/Setter MethodWriter which delegates to AbstractResource#get/setResourceValue(...) but is named more user-friendly.
      Returns:
      Getter/Setter MethodWriter
    • getCustomMethodWriters

      protected Collection<MethodWriter> getCustomMethodWriters()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createDefaultConstructorMethodWriter

      protected MethodWriter createDefaultConstructorMethodWriter()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createGetMethodWriter

      protected abstract MethodWriter createGetMethodWriter()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createDeleteMethodWriter

      protected abstract MethodWriter createDeleteMethodWriter()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createPutMethodWriter

      protected abstract MethodWriter createPutMethodWriter()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createPostMethodWriter

      protected abstract MethodWriter createPostMethodWriter()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createResourceValueMethodWriters

      protected Collection<MethodWriter> createResourceValueMethodWriters(String valueType, String genericType, String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createCRUDMethodWriter

      protected MethodWriter createCRUDMethodWriter(String ano, String methodName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a CRUD MethodWriter template.
      Parameters:
      ano - CRUD operation as annotation name
      methodName - CRUD method name
      Returns:
      MethodWriter
    • createReadResourceMethodWriter

      protected MethodWriter createReadResourceMethodWriter(String returnClassType)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createSubResourceMethodWriter

      protected MethodWriter createSubResourceMethodWriter(ResourceConfig subResourceCfg, boolean isSingleResource)
      Deprecated, for removal: This API element is subject to removal in a future version.