Class AbstractState

  • All Implemented Interfaces:
    edu.uiuc.ncsa.security.core.Logable, edu.uiuc.ncsa.security.util.scripting.StateInterface, Serializable
    Direct Known Subclasses:
    ModuleState

    public abstract class AbstractState
    extends Object
    implements edu.uiuc.ncsa.security.util.scripting.StateInterface, edu.uiuc.ncsa.security.core.Logable
    This helps us organize the functionality of the state object. There are subclasses of this that do specific tasks. The inheritance hierarchy is
     namespaces → variables → functions --. total state.
     

    Created by Jeff Gaynor
    on 2/2/20 at 6:37 AM

    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractState

        public AbstractState​(VStack vStack,
                             OpEvaluator opEvaluator,
                             MetaEvaluator metaEvaluator,
                             edu.uiuc.ncsa.security.core.util.MyLoggingFacade myLoggingFacade)
    • Method Detail

      • getScriptStack

        public List<String> getScriptStack()
      • setScriptStack

        public void setScriptStack​(List<String> scriptStack)
      • getUuid

        public UUID getUuid()
      • setUuid

        public void setUuid​(UUID uuid)
      • getSuperState

        public State getSuperState()
        Superstate is used in modules. If a module is created, then its state sets the super state so that references to the state vs. local module state can be cleanly separated.
        For instance, in an expression like a#b#f(x) the instance of b would have a superstate that is the current state of a.
        Returns:
      • setSuperState

        public void setSuperState​(State superState)
      • hasSuperState

        public boolean hasSuperState()
      • isIntrinsic

        public static boolean isIntrinsic​(String x)
      • getIoInterface

        public edu.uiuc.ncsa.security.util.cli.IOInterface getIoInterface()
      • setIoInterface

        public void setIoInterface​(edu.uiuc.ncsa.security.util.cli.IOInterface ioInterface)
      • getLogger

        public edu.uiuc.ncsa.security.core.util.MyLoggingFacade getLogger()
      • setLogger

        public void setLogger​(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger)
      • getVStack

        public VStack getVStack()
      • setvStack

        public void setvStack​(VStack vStack)
      • setOpEvaluator

        public void setOpEvaluator​(OpEvaluator opEvaluator)
      • setMetaEvaluator

        public void setMetaEvaluator​(MetaEvaluator metaEvaluator)
      • getOperatorType

        public int getOperatorType​(String name)
      • isDebugOn

        public boolean isDebugOn()
        Specified by:
        isDebugOn in interface edu.uiuc.ncsa.security.core.Logable
      • setDebugOn

        public void setDebugOn​(boolean setOn)
        Specified by:
        setDebugOn in interface edu.uiuc.ncsa.security.core.Logable
      • debug

        public void debug​(String x)
        Specified by:
        debug in interface edu.uiuc.ncsa.security.core.Logable
      • info

        public void info​(String x)
        Specified by:
        info in interface edu.uiuc.ncsa.security.core.Logable
      • hasLogging

        public boolean hasLogging()
      • warn

        public void warn​(String x)
        Specified by:
        warn in interface edu.uiuc.ncsa.security.core.Logable
      • error

        public void error​(String x)
        Specified by:
        error in interface edu.uiuc.ncsa.security.core.Logable
      • hasScriptArgs

        public boolean hasScriptArgs()
      • hasScriptName

        public boolean hasScriptName()
      • getScriptName

        public String getScriptName()
      • setScriptName

        public void setScriptName​(String scriptName)
      • getScriptArgStem

        public QDLStem getScriptArgStem()
      • setScriptArgStem

        public void setScriptArgStem​(QDLStem scriptArgStem)
      • getScriptArgs

        public Object[] getScriptArgs()
        Command line arguments if this is being run in script mode. This is an array of objects. If invoked from inside QDL then it may be any QDL variable. When coming from outside, these will be strings (since, e.g., bash is unaware of QDL variable types).
        Returns:
      • setScriptArgs

        public void setScriptArgs​(Object[] scriptArgs)
      • getScriptPaths

        public List<String> getScriptPaths()
      • isEnableLibrarySupport

        public boolean isEnableLibrarySupport()
      • setEnableLibrarySupport

        public void setEnableLibrarySupport​(boolean enableLibrarySupport)
      • setLibPath

        public void setLibPath​(String rawPath)
      • setLibPath

        public void setLibPath​(List<String> libPath)
      • getModulePaths

        public List<String> getModulePaths()
      • setModulePaths

        public void setModulePaths​(List<String> newModulePaths)
      • setModulePaths

        public void setModulePaths​(String rawPath)
      • pathToList

        protected List<String> pathToList​(String rawPath)
        Internally paths are always normalized to end in a "/";
        Parameters:
        rawPath -
        Returns:
      • setScriptPaths

        public void setScriptPaths​(String rawPath)
        Sets the script path from a string like path0:path1:path2. Each path in normalized form ends with a /.
        Parameters:
        rawPath -
      • setScriptPaths

        public void setScriptPaths​(List<String> scriptPaths)
      • isPrintUnicode

        public static boolean isPrintUnicode()
      • setPrintUnicode

        public static void setPrintUnicode​(boolean printU)