Class SimpleMethod


  • public final class SimpleMethod
    extends MiniLangElement
    Implements the <simple-method> element.

    The Mini-language script engine follows the flyweight design pattern. Mini-language XML files are parsed twice - first into a W3C DOM tree, then the DOM tree is parsed into element model objects. Each XML element has a model class, and each model class has its own factory.

    Mini-language can be extended by:

    See Also:
    Mini-language Reference
    • Field Detail

      • module

        public static final java.lang.String module
    • Constructor Detail

    • Method Detail

      • getDirectSimpleMethods

        public static java.util.Map<java.lang.String,​SimpleMethod> getDirectSimpleMethods​(java.lang.String name,
                                                                                                java.lang.String content,
                                                                                                java.lang.String fromLocation)
                                                                                         throws MiniLangException
        Throws:
        MiniLangException
      • getSimpleMethodsList

        public static java.util.List<SimpleMethod> getSimpleMethodsList​(java.lang.String xmlResource,
                                                                        java.lang.ClassLoader loader)
                                                                 throws MiniLangException
        Returns a List of SimpleMethod objects compiled from xmlResource. The ordering in the List is the same as the XML file.

        This method is used by unit test framework to run tests in the order they appear in the XML file. Method caching is bypassed since the methods are executed only once.

        Parameters:
        xmlResource -
        loader -
        Returns:
        Throws:
        MiniLangException
      • runSimpleService

        public static java.util.Map<java.lang.String,​java.lang.Object> runSimpleService​(java.lang.String xmlResource,
                                                                                              java.lang.String methodName,
                                                                                              DispatchContext ctx,
                                                                                              java.util.Map<java.lang.String,​? extends java.lang.Object> context)
                                                                                       throws MiniLangException
        Throws:
        MiniLangException
      • runSimpleService

        public static java.util.Map<java.lang.String,​java.lang.Object> runSimpleService​(java.lang.String xmlResource,
                                                                                              java.lang.String methodName,
                                                                                              DispatchContext ctx,
                                                                                              java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                                                                              java.lang.ClassLoader loader)
                                                                                       throws MiniLangException
        Throws:
        MiniLangException
      • runSimpleService

        public static java.util.Map<java.lang.String,​java.lang.Object> runSimpleService​(java.net.URL xmlURL,
                                                                                              java.lang.String methodName,
                                                                                              DispatchContext ctx,
                                                                                              java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                                                                              java.lang.ClassLoader loader)
                                                                                       throws MiniLangException
        Throws:
        MiniLangException
      • addErrorMessage

        public void addErrorMessage​(MethodContext methodContext,
                                    java.lang.String message)
      • addMessage

        public void addMessage​(MethodContext methodContext,
                               java.lang.String message)
      • getDefaultErrorCode

        public java.lang.String getDefaultErrorCode()
      • getDefaultSuccessCode

        public java.lang.String getDefaultSuccessCode()
      • getDelegatorEnvName

        public java.lang.String getDelegatorEnvName()
      • getDispatcherEnvName

        public java.lang.String getDispatcherEnvName()
      • getEventErrorMessageListName

        public java.lang.String getEventErrorMessageListName()
      • getEventErrorMessageName

        public java.lang.String getEventErrorMessageName()
      • getEventEventMessageListName

        public java.lang.String getEventEventMessageListName()
      • getEventEventMessageName

        public java.lang.String getEventEventMessageName()
      • getEventRequestName

        public java.lang.String getEventRequestName()
      • getEventResponseCodeName

        public java.lang.String getEventResponseCodeName()
      • getEventSessionName

        public java.lang.String getEventSessionName()
      • getFileName

        public java.lang.String getFileName()
      • getFromLocation

        public java.lang.String getFromLocation()
      • getLocationAndName

        public java.lang.String getLocationAndName()
      • getLoginRequired

        public boolean getLoginRequired()
      • getMethodName

        public java.lang.String getMethodName()
      • getMethodOperations

        public java.util.List<MethodOperation> getMethodOperations()
      • getParameterMapName

        public java.lang.String getParameterMapName()
      • getSecurityEnvName

        public java.lang.String getSecurityEnvName()
      • getServiceErrorMessageListName

        public java.lang.String getServiceErrorMessageListName()
      • getServiceErrorMessageMapName

        public java.lang.String getServiceErrorMessageMapName()
      • getServiceErrorMessageName

        public java.lang.String getServiceErrorMessageName()
      • getServiceResponseMessageName

        public java.lang.String getServiceResponseMessageName()
      • getServiceSuccessMessageListName

        public java.lang.String getServiceSuccessMessageListName()
      • getServiceSuccessMessageName

        public java.lang.String getServiceSuccessMessageName()
      • getShortDescription

        public java.lang.String getShortDescription()
      • getUserLoginEnvName

        public java.lang.String getUserLoginEnvName()
      • getUseTransaction

        public boolean getUseTransaction()