Class ProjectUtil
- java.lang.Object
-
- com.inductiveautomation.ignition.common.util.ProjectUtil
-
public class ProjectUtil extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TdecodeOrCreate(ResourceType resourceType, XMLDeserializer deserializer, java.lang.Class<T> clazz, Project p)Looks for a single project resource with the given module id and resource type.static <T> TdecodeOrCreate(ResourceType resourceType, XMLDeserializer deserializer, java.lang.Class<T> clazz, Project p, LoggerEx log)static <T> TdecodeOrNull(ResourceType resourceType, XMLDeserializer deserializer, java.lang.Class<T> clazz, Project project)static java.lang.StringdisplayTitle(Project p)static booleanisRunnable(ProjectManifest manifest)
-
-
-
Method Detail
-
displayTitle
public static java.lang.String displayTitle(Project p)
-
decodeOrCreate
public static <T> T decodeOrCreate(ResourceType resourceType, XMLDeserializer deserializer, java.lang.Class<T> clazz, Project p) throws java.lang.Exception
Looks for a single project resource with the given module id and resource type. If such a resource exists, it is deserialized into the desired class. If not, a new instance of the desired class is created by calling clazz.newInstance()- Parameters:
resourceType- The resource type for the project resource to look for.deserializer- An XML Deserializer to use to deserialize the project resource, if it is found.clazz- The desired type. Any serialized object of the found resource must be one of these.- Throws:
java.lang.Exception
-
decodeOrCreate
public static <T> T decodeOrCreate(ResourceType resourceType, XMLDeserializer deserializer, java.lang.Class<T> clazz, Project p, LoggerEx log) throws java.lang.Exception
- Throws:
java.lang.Exception
-
decodeOrNull
public static <T> T decodeOrNull(ResourceType resourceType, XMLDeserializer deserializer, java.lang.Class<T> clazz, Project project) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isRunnable
public static boolean isRunnable(ProjectManifest manifest)
-
-