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(since="1818", forRemoval=true) public abstract class AbstractResourceWriter extends ClassWriterDeprecated, for removal: This API element is subject to removal in a future version.since 1818AbstractClassWriterwhich 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.StringABSTRACT_YRESOURCEDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringREADRESOURCE_METHODDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringWS_DELETEDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringWS_GETDeprecated, for removal: This API element is subject to removal in a future version.static java.lang.StringWS_PATHDeprecated, for removal: This API element is subject to removal in a future version.static java.lang.StringWS_PATHPARAMDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringWS_POSTDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringWS_PUTDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringWS_RESPONSEDeprecated, for removal: This API element is subject to removal in a future version.-
Fields inherited from class de.hybris.bootstrap.codegenerator.ClassWriter
GENERATED_NOTICE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractResourceWriter(ResourceConfig cfg, CodeGenerator gen, YExtension ext)Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected MethodWritercreateCRUDMethodWriter(java.lang.String ano, java.lang.String methodName)Deprecated, for removal: This API element is subject to removal in a future version.Creates a CRUDMethodWritertemplate.protected MethodWritercreateDefaultConstructorMethodWriter()Deprecated, for removal: This API element is subject to removal in a future version.protected abstract MethodWritercreateDeleteMethodWriter()Deprecated, for removal: This API element is subject to removal in a future version.protected abstract MethodWritercreateGetMethodWriter()Deprecated, for removal: This API element is subject to removal in a future version.protected abstract MethodWritercreatePostMethodWriter()Deprecated, for removal: This API element is subject to removal in a future version.protected abstract MethodWritercreatePutMethodWriter()Deprecated, for removal: This API element is subject to removal in a future version.protected MethodWritercreateReadResourceMethodWriter(java.lang.String returnClassType)Deprecated, for removal: This API element is subject to removal in a future version.protected java.util.Collection<MethodWriter>createResourceValueMethodWriters(java.lang.String valueType, java.lang.String genericType, java.lang.String name)Deprecated, for removal: This API element is subject to removal in a future version.protected MethodWritercreateSubResourceMethodWriter(ResourceConfig subResourceCfg, boolean isSingleResource)Deprecated, for removal: This API element is subject to removal in a future version.protected voidfill()Deprecated, for removal: This API element is subject to removal in a future version.java.lang.StringgetClassName()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.protected java.util.Collection<MethodWriter>getConstructorMethodWriters()Deprecated, for removal: This API element is subject to removal in a future version.Returns the Constructor asMethodWriter.protected java.util.Collection<MethodWriter>getCRUDMethodWriters()Deprecated, for removal: This API element is subject to removal in a future version.Returns supported CRUD operations asMethodWriterCollectionprotected java.util.Collection<MethodWriter>getCustomMethodWriters()Deprecated, for removal: This API element is subject to removal in a future version.protected abstract MethodWritergetReadResourceMethodWriter()Deprecated, for removal: This API element is subject to removal in a future version.Returns the 'readResource'MethodWriter.protected ResourceConfiggetResourceConfig()Deprecated, for removal: This API element is subject to removal in a future version.Returns theResourceConfigwhich is used for specific generation information.protected abstract java.util.Collection<MethodWriter>getResourceValueMethodWriters()Deprecated, for removal: This API element is subject to removal in a future version.Convenience Getter/SetterMethodWriterwhich delegates to AbstractResource#get/setResourceValue(...) but is named more user-friendly.protected abstract java.util.Collection<MethodWriter>getSubResourceMethodWriters()Deprecated, for removal: This API element is subject to removal in a future version.Returns supported sub-resources asMethodWriterCollection-
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, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
WS_PUT
protected static final java.lang.String WS_PUT
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
WS_POST
protected static final java.lang.String WS_POST
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
WS_DELETE
protected static final java.lang.String WS_DELETE
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
WS_RESPONSE
protected static final java.lang.String WS_RESPONSE
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
WS_PATH
public static final java.lang.String WS_PATH
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
WS_PATHPARAM
public static final java.lang.String WS_PATHPARAM
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
ABSTRACT_YRESOURCE
protected static final java.lang.String ABSTRACT_YRESOURCE
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
READRESOURCE_METHOD
protected static final java.lang.String READRESOURCE_METHOD
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractResourceWriter
protected AbstractResourceWriter(ResourceConfig cfg, CodeGenerator gen, YExtension ext)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Detail
-
getClassName
public java.lang.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:
getClassNamein classClassWriter- Returns:
- resource class name
- See Also:
ClassWriter.getClassName()
-
getResourceConfig
protected ResourceConfig getResourceConfig()
Deprecated, for removal: This API element is subject to removal in a future version.Returns theResourceConfigwhich 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:
fillin classClassWriter
-
getConstructorMethodWriters
protected java.util.Collection<MethodWriter> getConstructorMethodWriters()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the Constructor asMethodWriter. Default implementation is default constructor.- Returns:
MethodWriter
-
getCRUDMethodWriters
protected java.util.Collection<MethodWriter> getCRUDMethodWriters()
Deprecated, for removal: This API element is subject to removal in a future version.Returns supported CRUD operations asMethodWriterCollection- Returns:
- Collection of
MethodWriter
-
getSubResourceMethodWriters
protected abstract java.util.Collection<MethodWriter> getSubResourceMethodWriters()
Deprecated, for removal: This API element is subject to removal in a future version.Returns supported sub-resources asMethodWriterCollection- 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 java.util.Collection<MethodWriter> getResourceValueMethodWriters()
Deprecated, for removal: This API element is subject to removal in a future version.Convenience Getter/SetterMethodWriterwhich delegates to AbstractResource#get/setResourceValue(...) but is named more user-friendly.- Returns:
- Getter/Setter
MethodWriter
-
getCustomMethodWriters
protected java.util.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 java.util.Collection<MethodWriter> createResourceValueMethodWriters(java.lang.String valueType, java.lang.String genericType, java.lang.String name)
Deprecated, for removal: This API element is subject to removal in a future version.
-
createCRUDMethodWriter
protected MethodWriter createCRUDMethodWriter(java.lang.String ano, java.lang.String methodName)
Deprecated, for removal: This API element is subject to removal in a future version.Creates a CRUDMethodWritertemplate.- Parameters:
ano- CRUD operation as annotation namemethodName- CRUD method name- Returns:
MethodWriter
-
createReadResourceMethodWriter
protected MethodWriter createReadResourceMethodWriter(java.lang.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.
-
-