Class AbstractResourceWriter
- 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 public abstract class AbstractResourceWriter extends ClassWriter
Deprecated.since 1818AbstractClassWriter
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 Summary
Fields Modifier and Type Field Description protected static java.lang.String
ABSTRACT_YRESOURCE
Deprecated.protected static java.lang.String
READRESOURCE_METHOD
Deprecated.protected static java.lang.String
WS_DELETE
Deprecated.protected static java.lang.String
WS_GET
Deprecated.static java.lang.String
WS_PATH
Deprecated.static java.lang.String
WS_PATHPARAM
Deprecated.protected static java.lang.String
WS_POST
Deprecated.protected static java.lang.String
WS_PUT
Deprecated.protected static java.lang.String
WS_RESPONSE
Deprecated.-
Fields inherited from class de.hybris.bootstrap.codegenerator.ClassWriter
GENERATED_NOTICE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractResourceWriter(ResourceConfig cfg, CodeGenerator gen, YExtension ext)
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected MethodWriter
createCRUDMethodWriter(java.lang.String ano, java.lang.String methodName)
Deprecated.Creates a CRUDMethodWriter
template.protected MethodWriter
createDefaultConstructorMethodWriter()
Deprecated.protected abstract MethodWriter
createDeleteMethodWriter()
Deprecated.protected abstract MethodWriter
createGetMethodWriter()
Deprecated.protected abstract MethodWriter
createPostMethodWriter()
Deprecated.protected abstract MethodWriter
createPutMethodWriter()
Deprecated.protected MethodWriter
createReadResourceMethodWriter(java.lang.String returnClassType)
Deprecated.protected java.util.Collection<MethodWriter>
createResourceValueMethodWriters(java.lang.String valueType, java.lang.String genericType, java.lang.String name)
Deprecated.protected MethodWriter
createSubResourceMethodWriter(ResourceConfig subResourceCfg, boolean isSingleResource)
Deprecated.protected void
fill()
Deprecated.java.lang.String
getClassName()
Deprecated.Returns the simple class name of the resource which shall be generated.protected java.util.Collection<MethodWriter>
getConstructorMethodWriters()
Deprecated.Returns the Constructor asMethodWriter
.protected java.util.Collection<MethodWriter>
getCRUDMethodWriters()
Deprecated.Returns supported CRUD operations asMethodWriter
Collectionprotected java.util.Collection<MethodWriter>
getCustomMethodWriters()
Deprecated.protected abstract MethodWriter
getReadResourceMethodWriter()
Deprecated.Returns the 'readResource'MethodWriter
.protected ResourceConfig
getResourceConfig()
Deprecated.Returns theResourceConfig
which is used for specific generation information.protected abstract java.util.Collection<MethodWriter>
getResourceValueMethodWriters()
Deprecated.Convenience Getter/SetterMethodWriter
which delegates to AbstractResource#get/setResourceValue(...) but is named more user-friendly.protected abstract java.util.Collection<MethodWriter>
getSubResourceMethodWriters()
Deprecated.Returns supported sub-resources asMethodWriter
Collection-
Methods inherited from class de.hybris.bootstrap.codegenerator.ClassWriter
addAnnotation, addAnnotationIfDeprecated, addAnnotations, addConstantDeclaration, addConstantDeclaration, addConstructor, addDeclaration, addDeclaration, addDeclaration, addInterface, addMethod, assembleAbstractClassName, assembleClassName, containsAnnotation, firstLetterUpperCase, getAnnotations, getClassToExtend, getConstantDeclarations, getConstructors, getCopyright, getDeclarations, getExtension, getGenerator, getInfo, getInterfaces, getJavadoc, getMethods, getModifiers, getPackageName, getRequiredImports, getVisibility, isGeneratePartOf, processAnnotations, removeSelfImport, setClassToExtend, setCopyright, setJavadoc, setModifiers, setPackageName, setVisibility, sortMethods, write, writeMethods, writeSignature
-
Methods inherited from class de.hybris.bootstrap.codegenerator.AbstractImportProvider
addRequiredImport
-
-
-
-
Field Detail
-
WS_GET
protected static final java.lang.String WS_GET
Deprecated.- See Also:
- Constant Field Values
-
WS_PUT
protected static final java.lang.String WS_PUT
Deprecated.- See Also:
- Constant Field Values
-
WS_POST
protected static final java.lang.String WS_POST
Deprecated.- See Also:
- Constant Field Values
-
WS_DELETE
protected static final java.lang.String WS_DELETE
Deprecated.- See Also:
- Constant Field Values
-
WS_RESPONSE
protected static final java.lang.String WS_RESPONSE
Deprecated.- See Also:
- Constant Field Values
-
WS_PATH
public static final java.lang.String WS_PATH
Deprecated.- See Also:
- Constant Field Values
-
WS_PATHPARAM
public static final java.lang.String WS_PATHPARAM
Deprecated.- See Also:
- Constant Field Values
-
ABSTRACT_YRESOURCE
protected static final java.lang.String ABSTRACT_YRESOURCE
Deprecated.- See Also:
- Constant Field Values
-
READRESOURCE_METHOD
protected static final java.lang.String READRESOURCE_METHOD
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractResourceWriter
protected AbstractResourceWriter(ResourceConfig cfg, CodeGenerator gen, YExtension ext)
Deprecated.
-
-
Method Detail
-
getClassName
public java.lang.String getClassName()
Deprecated.Returns the simple class name of the resource which shall be generated.- Overrides:
getClassName
in classClassWriter
- Returns:
- resource class name
- See Also:
ClassWriter.getClassName()
-
getResourceConfig
protected ResourceConfig getResourceConfig()
Deprecated.Returns theResourceConfig
which is used for specific generation information.- Returns:
ResourceConfig
-
fill
protected void fill()
Deprecated.- Overrides:
fill
in classClassWriter
-
getConstructorMethodWriters
protected java.util.Collection<MethodWriter> getConstructorMethodWriters()
Deprecated.Returns the Constructor asMethodWriter
. Default implementation is default constructor.- Returns:
MethodWriter
-
getCRUDMethodWriters
protected java.util.Collection<MethodWriter> getCRUDMethodWriters()
Deprecated.Returns supported CRUD operations asMethodWriter
Collection- Returns:
- Collection of
MethodWriter
-
getSubResourceMethodWriters
protected abstract java.util.Collection<MethodWriter> getSubResourceMethodWriters()
Deprecated.Returns supported sub-resources asMethodWriter
Collection- Returns:
- Collection of
MethodWriter
-
getReadResourceMethodWriter
protected abstract MethodWriter getReadResourceMethodWriter()
Deprecated.Returns the 'readResource'MethodWriter
.- Returns:
MethodWriter
-
getResourceValueMethodWriters
protected abstract java.util.Collection<MethodWriter> getResourceValueMethodWriters()
Deprecated.Convenience Getter/SetterMethodWriter
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 CRUDMethodWriter
template.- Parameters:
ano
- CRUD operation as annotation namemethodName
- CRUD method name- Returns:
MethodWriter
-
createReadResourceMethodWriter
protected MethodWriter createReadResourceMethodWriter(java.lang.String returnClassType)
Deprecated.
-
createSubResourceMethodWriter
protected MethodWriter createSubResourceMethodWriter(ResourceConfig subResourceCfg, boolean isSingleResource)
Deprecated.
-
-