Class GenericCrudCommand

    • Field Detail

      • LOGGER

        protected static final Logger LOGGER
      • commandName

        protected String commandName
      • parentType

        protected Class parentType
      • targetType

        protected Class targetType
      • targetMethod

        protected Method targetMethod
      • level

        protected static final Level level
    • Constructor Detail

      • GenericCrudCommand

        public GenericCrudCommand()
    • Method Detail

      • postConstruct

        public void postConstruct()
        Specified by:
        postConstruct in interface org.glassfish.hk2.api.PostConstruct
      • setInjectionResolver

        public void setInjectionResolver​(InjectionResolver<Param> injector)
        we need to have access to the injector instance that has all the parameters context
        Parameters:
        injector - the original command injector
      • convertStringToProperties

        public static Properties convertStringToProperties​(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 String elementName​(DomDocument document,
                                         Class<?> parent,
                                         Class<?> child)
                                  throws 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:
        ClassNotFoundException - when subclasses cannot be loaded
      • getDecoratorClass

        public abstract Class getDecoratorClass()
        Decorator class if particular command
        Returns: