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 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.protected static java.lang.StringREADRESOURCE_METHODDeprecated.protected static java.lang.StringWS_DELETEDeprecated.protected static java.lang.StringWS_GETDeprecated.static java.lang.StringWS_PATHDeprecated.static java.lang.StringWS_PATHPARAMDeprecated.protected static java.lang.StringWS_POSTDeprecated.protected static java.lang.StringWS_PUTDeprecated.protected static java.lang.StringWS_RESPONSEDeprecated.-
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.
-
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.Creates a CRUDMethodWritertemplate.protected MethodWritercreateDefaultConstructorMethodWriter()Deprecated.protected abstract MethodWritercreateDeleteMethodWriter()Deprecated.protected abstract MethodWritercreateGetMethodWriter()Deprecated.protected abstract MethodWritercreatePostMethodWriter()Deprecated.protected abstract MethodWritercreatePutMethodWriter()Deprecated.protected MethodWritercreateReadResourceMethodWriter(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 MethodWritercreateSubResourceMethodWriter(ResourceConfig subResourceCfg, boolean isSingleResource)Deprecated.protected voidfill()Deprecated.java.lang.StringgetClassName()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 asMethodWriterCollectionprotected java.util.Collection<MethodWriter>getCustomMethodWriters()Deprecated.protected abstract MethodWritergetReadResourceMethodWriter()Deprecated.Returns the 'readResource'MethodWriter.protected ResourceConfiggetResourceConfig()Deprecated.Returns theResourceConfigwhich is used for specific generation information.protected abstract java.util.Collection<MethodWriter>getResourceValueMethodWriters()Deprecated.Convenience Getter/SetterMethodWriterwhich delegates to AbstractResource#get/setResourceValue(...) but is named more user-friendly.protected abstract java.util.Collection<MethodWriter>getSubResourceMethodWriters()Deprecated.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.- 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:
getClassNamein classClassWriter- Returns:
- resource class name
- See Also:
ClassWriter.getClassName()
-
getResourceConfig
protected ResourceConfig getResourceConfig()
Deprecated.Returns theResourceConfigwhich is used for specific generation information.- Returns:
ResourceConfig
-
fill
protected void fill()
Deprecated.- Overrides:
fillin 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 asMethodWriterCollection- Returns:
- Collection of
MethodWriter
-
getSubResourceMethodWriters
protected abstract java.util.Collection<MethodWriter> getSubResourceMethodWriters()
Deprecated.Returns supported sub-resources asMethodWriterCollection- 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/SetterMethodWriterwhich 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 CRUDMethodWritertemplate.- 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.
-
-