Class ProjectTagManager
- java.lang.Object
-
- com.inductiveautomation.factorypmi.application.sqltags.project.ProjectTagManager
-
- All Implemented Interfaces:
ClientSubManager
public class ProjectTagManager extends java.lang.Object implements ClientSubManager
This tag manager hold the root of the project tag tree configuration. The root tag is serialized as a project resource, and will be set when the app is created.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ProjectTagManager.ClientTagScriptManager
-
Field Summary
Fields Modifier and Type Field Description static ResourceType
CLIENT_TAG_RESOURCE_TYPE
static java.lang.String
NAME
-
Constructor Summary
Constructors Constructor Description ProjectTagManager(VisionClientContext parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<TagPath>
addTags(TagPath parentFolder, java.util.List<Tag> tags, CollisionPolicy policy)
java.util.List<Tag>
browse(TagPath root)
void
clearModified()
TagNode
createFolder(java.lang.String name)
TagNode
createTag(BoundPropertySet config)
void
editTags(java.util.List<TagPath> paths, TagDiff edit)
protected ClientTag
findTag(TagPath path)
Returns the ClientTag at the given path, or null if there is no tag at the path.protected ClientTag
findTagParent(TagPath path)
Returns the nearest (upwards) folder tag for the given tag path.protected TagPath
findTagParentPath(TagPath path)
Returns the nearest (upwards) folder tag path for the given tag path.java.util.Set<TagType>
getAcceptableTags()
ProjectResourceId
getResourceId()
ClientTag
getRoot()
Tag
getTag(TagPath path)
java.util.List<Tag>
getTags(java.util.List<TagPath> paths)
TagScriptManager
getTagScriptManager()
boolean
isModified()
java.util.List<TagPath>
moveTags(TagPath parentFolder, java.util.List<TagPath> tagPaths, boolean copy, CollisionPolicy policy)
java.util.List<QualifiedValue>
read(java.util.List<TagPath> paths)
protected void
removeFromSubMgr(TagPath path, TagNode node)
void
removeTags(java.util.List<TagPath> tagPaths)
void
setPaused(boolean paused)
Empty implementationvoid
setResourceId(ProjectResourceId resourceId)
void
setRoot(ClientTag newRoot, boolean delayStartup)
void
shutdown()
void
startup()
void
subscribe(TagPath path, TagChangeListener listener)
void
subscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
void
unsubscribe(TagPath path, TagChangeListener listener)
void
unsubscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
WriteOperation
write(TagPath path, java.lang.Object value)
-
-
-
Field Detail
-
CLIENT_TAG_RESOURCE_TYPE
public static final ResourceType CLIENT_TAG_RESOURCE_TYPE
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProjectTagManager
public ProjectTagManager(VisionClientContext parent)
-
-
Method Detail
-
getAcceptableTags
public java.util.Set<TagType> getAcceptableTags()
-
getTagScriptManager
public TagScriptManager getTagScriptManager()
-
removeTags
public void removeTags(java.util.List<TagPath> tagPaths)
- Specified by:
removeTags
in interfaceClientSubManager
-
editTags
public void editTags(java.util.List<TagPath> paths, TagDiff edit)
- Specified by:
editTags
in interfaceClientSubManager
-
addTags
public java.util.List<TagPath> addTags(TagPath parentFolder, java.util.List<Tag> tags, CollisionPolicy policy) throws java.lang.Exception
- Specified by:
addTags
in interfaceClientSubManager
- Throws:
java.lang.Exception
-
moveTags
public java.util.List<TagPath> moveTags(TagPath parentFolder, java.util.List<TagPath> tagPaths, boolean copy, CollisionPolicy policy) throws java.lang.Exception
- Specified by:
moveTags
in interfaceClientSubManager
- Throws:
java.lang.Exception
-
getTag
public Tag getTag(TagPath path)
- Specified by:
getTag
in interfaceClientSubManager
-
getTags
public java.util.List<Tag> getTags(java.util.List<TagPath> paths)
- Specified by:
getTags
in interfaceClientSubManager
-
findTagParent
protected ClientTag findTagParent(TagPath path)
Returns the nearest (upwards) folder tag for the given tag path.
-
findTagParentPath
protected TagPath findTagParentPath(TagPath path)
Returns the nearest (upwards) folder tag path for the given tag path.
-
findTag
protected ClientTag findTag(TagPath path)
Returns the ClientTag at the given path, or null if there is no tag at the path.
-
subscribe
public void subscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
- Specified by:
subscribe
in interfaceClientSubManager
-
unsubscribe
public void unsubscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
- Specified by:
unsubscribe
in interfaceClientSubManager
-
subscribe
public void subscribe(TagPath path, TagChangeListener listener)
- Specified by:
subscribe
in interfaceClientSubManager
-
unsubscribe
public void unsubscribe(TagPath path, TagChangeListener listener)
- Specified by:
unsubscribe
in interfaceClientSubManager
-
getResourceId
public ProjectResourceId getResourceId()
-
setResourceId
public void setResourceId(ProjectResourceId resourceId)
-
getRoot
public ClientTag getRoot()
-
setRoot
public void setRoot(ClientTag newRoot, boolean delayStartup)
-
startup
public void startup()
- Specified by:
startup
in interfaceClientSubManager
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceClientSubManager
-
setPaused
public void setPaused(boolean paused)
Empty implementation
-
read
public java.util.List<QualifiedValue> read(java.util.List<TagPath> paths)
- Specified by:
read
in interfaceClientSubManager
-
write
public WriteOperation write(TagPath path, java.lang.Object value)
- Specified by:
write
in interfaceClientSubManager
-
browse
public java.util.List<Tag> browse(TagPath root)
- Specified by:
browse
in interfaceClientSubManager
-
isModified
public boolean isModified()
-
clearModified
public void clearModified()
-
createFolder
public TagNode createFolder(java.lang.String name)
-
createTag
public TagNode createTag(BoundPropertySet config)
-
-