Class ModuleLibrary
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.script.ModuleLibrary
 
- 
 public class ModuleLibrary extends java.lang.ObjectClass for project resource Python script libraries
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classModuleLibrary.ScriptHintScope
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringCODE_DATA_KEYstatic ModuleLibrary.ScriptHintScopeDEFAULT_HINT_SCOPEstatic java.lang.StringHINT_SCOPE_KEYstatic java.lang.StringLEGACY_PROJECT_MODULEstatic java.lang.StringLEGACY_SHARED_MODULEstatic java.lang.StringMODULE_IDstatic ResourceTypeRESOURCE_TYPEstatic intSCOPE
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringdeserializeScript(ProjectResource r)static ModuleLibrary.ScriptHintScopegetScope(ProjectResource resource)static voidinstall(Project project, ScriptManager manager)static voidinstall(java.util.List<ProjectResource> scripts, ScriptManager manager)static java.util.function.Consumer<ProjectResourceBuilder>serializeScript(java.lang.String script, ModuleLibrary.ScriptHintScope scope)static booleanvalidateFullPath(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.static booleanvalidatePackageName(org.python.core.PyStringMap modules, ResourcePath destination, java.lang.String newValue)Checks whether a given name is legal to be inserted at the target location.
 
- 
- 
- 
Field Detail- 
MODULE_IDpublic static final java.lang.String MODULE_ID - See Also:
- Constant Field Values
 
 - 
RESOURCE_TYPEpublic static final ResourceType RESOURCE_TYPE 
 - 
SCOPEpublic static final int SCOPE - See Also:
- Constant Field Values
 
 - 
CODE_DATA_KEYpublic static final java.lang.String CODE_DATA_KEY - See Also:
- Constant Field Values
 
 - 
LEGACY_SHARED_MODULEpublic static final java.lang.String LEGACY_SHARED_MODULE - See Also:
- Constant Field Values
 
 - 
LEGACY_PROJECT_MODULEpublic static final java.lang.String LEGACY_PROJECT_MODULE - See Also:
- Constant Field Values
 
 - 
HINT_SCOPE_KEYpublic static final java.lang.String HINT_SCOPE_KEY - See Also:
- Constant Field Values
 
 - 
DEFAULT_HINT_SCOPEpublic static final ModuleLibrary.ScriptHintScope DEFAULT_HINT_SCOPE 
 
- 
 - 
Method Detail- 
installpublic static void install(Project project, ScriptManager manager) 
 - 
installpublic static void install(java.util.List<ProjectResource> scripts, ScriptManager manager) 
 - 
deserializeScriptpublic static java.lang.String deserializeScript(ProjectResource r) 
 - 
serializeScriptpublic static java.util.function.Consumer<ProjectResourceBuilder> serializeScript(java.lang.String script, ModuleLibrary.ScriptHintScope scope) 
 - 
getScopepublic static ModuleLibrary.ScriptHintScope getScope(ProjectResource resource) 
 - 
validatePackageNamepublic 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.
 
 - 
validateFullPathpublic 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.
 
 
- 
 
-