Class ModuleLibrary


  • public class ModuleLibrary
    extends java.lang.Object
    Class for project resource Python script libraries
    • Method Detail

      • deserializeScript

        public static java.lang.String deserializeScript​(ProjectResource r)
      • validatePackageName

        public static boolean validatePackageName​(@Nonnull
                                                  org.python.core.PyStringMap modules,
                                                  @Nonnull
                                                  ResourcePath destination,
                                                  @Nonnull
                                                  java.lang.String newValue)
        Checks whether a given name is legal to be inserted at the target location.
        Parameters:
        modules - The modules installed in the relevant context' ScriptManager; see ScriptManager.getModules()
        destination - The path where this resource will be inserted. Used to check for sibling conflicts.
        newValue - The actual name up for consideration.
        Returns:
        Whether the given name (at the given location) is legal to be inserted.
      • validateFullPath

        public static boolean validateFullPath​(org.python.core.PyStringMap modules,
                                               StringPath fullPath)
        Validates a StringPath of potential package names (ending with a module name) to ensure all elements are legal names.
        Parameters:
        modules - The modules installed in the relevant context' ScriptManager; ScriptManager.getModules()
        fullPath - The StringPath to consider.
        Returns:
        true only if the full path sequence is valid.