org.glassfish.admin.rest.generator
Class TextClassWriter

java.lang.Object
  extended by org.glassfish.admin.rest.generator.TextClassWriter
All Implemented Interfaces:
ClassWriter

public class TextClassWriter
extends java.lang.Object
implements ClassWriter

Author:
Mitesh Meswani

Constructor Summary
TextClassWriter(org.jvnet.hk2.component.Habitat habitat, java.io.File generationDir, java.lang.String className, java.lang.String baseClassName, java.lang.String resourcePath)
           
 
Method Summary
 void createCommandResourceConstructor(java.lang.String commandResourceClassName, java.lang.String commandName, java.lang.String httpMethod, boolean linkedToParent, CommandResourceMetaData.ParameterMetaData[] commandParams, java.lang.String commandDisplayName, java.lang.String commandAction)
           
 void createCustomResourceMapping(java.lang.String resourceClassName, java.lang.String mappingPath)
           
 void createGetChildResource(java.lang.String path, java.lang.String childResourceClassName)
           
 void createGetChildResourceForListResources(java.lang.String keyAttributeName, java.lang.String childResourceClassName)
           
 void createGetCommandResource(java.lang.String commandResourceClassName, java.lang.String resourcePath)
           
 void createGetCommandResourcePaths(java.util.List<CommandResourceMetaData> commandMetaData)
           
 void createGetDeleteCommand(java.lang.String commandName)
           
 void createGetDeleteCommandForCollectionLeafResource(java.lang.String deleteCommandName)
           
 void createGetDisplayNameForCollectionLeafResource(java.lang.String displayName)
           
 void createGetPostCommand(java.lang.String commandName)
           
 void createGetPostCommandForCollectionLeafResource(java.lang.String postCommandName)
           
 void done()
          Called to end creation of class being written by this writer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextClassWriter

public TextClassWriter(org.jvnet.hk2.component.Habitat habitat,
                       java.io.File generationDir,
                       java.lang.String className,
                       java.lang.String baseClassName,
                       java.lang.String resourcePath)
                throws java.io.IOException
Parameters:
className - Name of class to be generated
generationDir - Absolute location where it needs to be generated
baseClassName -
resourcePath -
Throws:
java.io.IOException
Method Detail

createCommandResourceConstructor

public void createCommandResourceConstructor(java.lang.String commandResourceClassName,
                                             java.lang.String commandName,
                                             java.lang.String httpMethod,
                                             boolean linkedToParent,
                                             CommandResourceMetaData.ParameterMetaData[] commandParams,
                                             java.lang.String commandDisplayName,
                                             java.lang.String commandAction)
Specified by:
createCommandResourceConstructor in interface ClassWriter

createGetCommandResource

public void createGetCommandResource(java.lang.String commandResourceClassName,
                                     java.lang.String resourcePath)
Specified by:
createGetCommandResource in interface ClassWriter

createCustomResourceMapping

public void createCustomResourceMapping(java.lang.String resourceClassName,
                                        java.lang.String mappingPath)
Specified by:
createCustomResourceMapping in interface ClassWriter

createGetCommandResourcePaths

public void createGetCommandResourcePaths(java.util.List<CommandResourceMetaData> commandMetaData)
Specified by:
createGetCommandResourcePaths in interface ClassWriter

createGetDeleteCommand

public void createGetDeleteCommand(java.lang.String commandName)
Specified by:
createGetDeleteCommand in interface ClassWriter

createGetPostCommand

public void createGetPostCommand(java.lang.String commandName)
Specified by:
createGetPostCommand in interface ClassWriter

createGetChildResource

public void createGetChildResource(java.lang.String path,
                                   java.lang.String childResourceClassName)
Specified by:
createGetChildResource in interface ClassWriter

createGetChildResourceForListResources

public void createGetChildResourceForListResources(java.lang.String keyAttributeName,
                                                   java.lang.String childResourceClassName)
Specified by:
createGetChildResourceForListResources in interface ClassWriter

createGetPostCommandForCollectionLeafResource

public void createGetPostCommandForCollectionLeafResource(java.lang.String postCommandName)
Specified by:
createGetPostCommandForCollectionLeafResource in interface ClassWriter

createGetDeleteCommandForCollectionLeafResource

public void createGetDeleteCommandForCollectionLeafResource(java.lang.String deleteCommandName)
Specified by:
createGetDeleteCommandForCollectionLeafResource in interface ClassWriter

createGetDisplayNameForCollectionLeafResource

public void createGetDisplayNameForCollectionLeafResource(java.lang.String displayName)
Specified by:
createGetDisplayNameForCollectionLeafResource in interface ClassWriter

done

public void done()
Description copied from interface: ClassWriter
Called to end creation of class being written by this writer

Specified by:
done in interface ClassWriter


Copyright © 2012 GlassFish Community. All Rights Reserved.