org.glassfish.config.support
Class GenericCrudCommand

java.lang.Object
  extended by org.glassfish.config.support.GenericCrudCommand
All Implemented Interfaces:
CommandModelProvider, org.jvnet.hk2.component.PostConstruct
Direct Known Subclasses:
GenericCreateCommand, GenericDeleteCommand, GenericListCommand

public abstract class GenericCrudCommand
extends java.lang.Object
implements CommandModelProvider, org.jvnet.hk2.component.PostConstruct

services pertinent to generic CRUD command implementations

Author:
Jerome Dochez

Field Summary
protected  java.util.logging.Level level
           
protected static LocalStringManagerImpl localStrings
           
protected static java.util.logging.Logger logger
           
 
Constructor Summary
GenericCrudCommand()
           
 
Method Summary
static java.util.Properties convertStringToProperties(java.lang.String propsString, char sep)
          Convert a String with the following format to Properties: name1=value1:name2=value2:name3=value3:...
static java.lang.String elementName(org.jvnet.hk2.config.DomDocument document, java.lang.Class<?> parent, java.lang.Class<?> child)
          Returns the element name used by the parent to store instances of the child
protected
<T extends java.lang.annotation.Annotation>
T
getAnnotation(java.lang.reflect.Method target, java.lang.Class<T> type)
           
 com.sun.hk2.component.InjectionResolver<Param> getInjectionResolver()
           
protected  java.lang.Class loadClass(java.lang.String type)
           
 void postConstruct()
           
 void setInjectionResolver(com.sun.hk2.component.InjectionResolver<Param> injector)
          we need to have access to the injector instance that has all the parameters context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.glassfish.api.admin.CommandModelProvider
getModel
 

Field Detail

logger

protected static final java.util.logging.Logger logger

localStrings

protected static final LocalStringManagerImpl localStrings

level

protected final java.util.logging.Level level
Constructor Detail

GenericCrudCommand

public GenericCrudCommand()
Method Detail

postConstruct

public void postConstruct()
Specified by:
postConstruct in interface org.jvnet.hk2.component.PostConstruct

getAnnotation

protected <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.reflect.Method target,
                                                                      java.lang.Class<T> type)

setInjectionResolver

public void setInjectionResolver(com.sun.hk2.component.InjectionResolver<Param> injector)
we need to have access to the injector instance that has all the parameters context

Parameters:
injector - the original command injector

getInjectionResolver

public com.sun.hk2.component.InjectionResolver<Param> getInjectionResolver()

loadClass

protected java.lang.Class loadClass(java.lang.String type)
                             throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

convertStringToProperties

public static java.util.Properties convertStringToProperties(java.lang.String propsString,
                                                             char sep)
Convert a String with the following format to Properties: name1=value1:name2=value2:name3=value3:... The Properties object contains elements: {name1=value1, name2=value2, name3=value3, ...}

Parameters:
propsString - the String to convert
sep - the separator character
Returns:
Properties containing the elements in String

elementName

public static java.lang.String elementName(org.jvnet.hk2.config.DomDocument document,
                                           java.lang.Class<?> parent,
                                           java.lang.Class<?> child)
                                    throws java.lang.ClassNotFoundException
Returns the element name used by the parent to store instances of the child

Parameters:
document - the dom document this configuration element lives in.
parent - type of the parent
child - type of the child
Returns:
the element name holding child's instances in the parent
Throws:
java.lang.ClassNotFoundException - when subclasses cannot be loaded


Copyright © 2012 GlassFish Community. All Rights Reserved.