Class TextClassWriter
- java.lang.Object
-
- org.glassfish.admin.rest.generator.TextClassWriter
-
- All Implemented Interfaces:
ClassWriter
public class TextClassWriter extends Object implements ClassWriter
- Author:
- Mitesh Meswani
-
-
Constructor Summary
Constructors Constructor Description TextClassWriter(org.glassfish.hk2.api.ServiceLocator habitat, File generationDir, String className, String baseClassName, String resourcePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateCommandResourceConstructor(String commandResourceClassName, String commandName, String httpMethod, boolean linkedToParent, CommandResourceMetaData.ParameterMetaData[] commandParams, String commandDisplayName, String commandAction)voidcreateCustomResourceMapping(String resourceClassName, String mappingPath)voidcreateGetChildResource(String path, String childResourceClassName)voidcreateGetChildResourceForListResources(String keyAttributeName, String childResourceClassName)voidcreateGetCommandResource(String commandResourceClassName, String resourcePath)voidcreateGetCommandResourcePaths(List<CommandResourceMetaData> commandMetaData)voidcreateGetDeleteCommand(String commandName)voidcreateGetDeleteCommandForCollectionLeafResource(String deleteCommandName)voidcreateGetDisplayNameForCollectionLeafResource(String displayName)voidcreateGetPostCommand(String commandName)voidcreateGetPostCommandForCollectionLeafResource(String postCommandName)voiddone()Called to end creation of class being written by this writer
-
-
-
Constructor Detail
-
TextClassWriter
public TextClassWriter(org.glassfish.hk2.api.ServiceLocator habitat, File generationDir, String className, String baseClassName, String resourcePath) throws IOException- Parameters:
className- Name of class to be generatedgenerationDir- Absolute location where it needs to be generatedbaseClassName-resourcePath-- Throws:
IOException
-
-
Method Detail
-
createCommandResourceConstructor
public void createCommandResourceConstructor(String commandResourceClassName, String commandName, String httpMethod, boolean linkedToParent, CommandResourceMetaData.ParameterMetaData[] commandParams, String commandDisplayName, String commandAction)
- Specified by:
createCommandResourceConstructorin interfaceClassWriter
-
createGetCommandResource
public void createGetCommandResource(String commandResourceClassName, String resourcePath)
- Specified by:
createGetCommandResourcein interfaceClassWriter
-
createCustomResourceMapping
public void createCustomResourceMapping(String resourceClassName, String mappingPath)
- Specified by:
createCustomResourceMappingin interfaceClassWriter
-
createGetCommandResourcePaths
public void createGetCommandResourcePaths(List<CommandResourceMetaData> commandMetaData)
- Specified by:
createGetCommandResourcePathsin interfaceClassWriter
-
createGetDeleteCommand
public void createGetDeleteCommand(String commandName)
- Specified by:
createGetDeleteCommandin interfaceClassWriter
-
createGetPostCommand
public void createGetPostCommand(String commandName)
- Specified by:
createGetPostCommandin interfaceClassWriter
-
createGetChildResource
public void createGetChildResource(String path, String childResourceClassName)
- Specified by:
createGetChildResourcein interfaceClassWriter
-
createGetChildResourceForListResources
public void createGetChildResourceForListResources(String keyAttributeName, String childResourceClassName)
- Specified by:
createGetChildResourceForListResourcesin interfaceClassWriter
-
createGetPostCommandForCollectionLeafResource
public void createGetPostCommandForCollectionLeafResource(String postCommandName)
- Specified by:
createGetPostCommandForCollectionLeafResourcein interfaceClassWriter
-
createGetDeleteCommandForCollectionLeafResource
public void createGetDeleteCommandForCollectionLeafResource(String deleteCommandName)
- Specified by:
createGetDeleteCommandForCollectionLeafResourcein interfaceClassWriter
-
createGetDisplayNameForCollectionLeafResource
public void createGetDisplayNameForCollectionLeafResource(String displayName)
- Specified by:
createGetDisplayNameForCollectionLeafResourcein interfaceClassWriter
-
done
public void done()
Description copied from interface:ClassWriterCalled to end creation of class being written by this writer- Specified by:
donein interfaceClassWriter
-
-