Class OrganizationalUnit
java.lang.Object
com.thingworx.types.NamedObject
com.thingworx.security.organizations.OrganizationalUnit
- All Implemented Interfaces:
IDiffableObject
,INamedObject
,Serializable
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public final class OrganizationalUnit
extends NamedObject
- See Also:
-
Field Summary
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Service Category: Members Service Description: Add a user/group to this Organizational Unit.void
AssignMembers
(InfoTable members) void
DeleteMember
(String member, String type) static OrganizationalUnit
fromJSON
(org.json.JSONObject jsonObject) QueryMembers
(org.json.JSONObject types, String filter, Double maxItems) org.json.JSONObject
toJSON()
Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
-
Constructor Details
-
OrganizationalUnit
public OrganizationalUnit()
-
-
Method Details
-
AssignMembers
@ThingworxExtensionApiMethod(since={6,6}) public void AssignMembers(InfoTable members) throws Exception - Throws:
Exception
- If an error occurs
-
AddMember
@ThingworxExtensionApiMethod(since={6,6}) public void AddMember(String member, String type) throws Exception - Service Category:
- Members
- Service Description:
- Add a user/group to this Organizational Unit.
- Parameters:
member
- Member - STRINGtype
- Member type must be set to either User or Group - STRING- Throws:
Exception
- If an error occurs
Additional Information: Adds a user/group, but does not persist this information to this organizational unit. A server restart will revert the changes unlessOrganization.AddMember(name, member, type)
is also invoked to commit the transaction to the database. Suggested Use: For performance reasons, use this method to load large number of users or groups to Organizational Units in memory first, then persist the information at the end usingOrganization.AddMember(name, member, type)
. For regular addition of a few individual users or groups, add the members throughOrganization.AddMember(name, member, type)
instead.
-
DeleteMember
@ThingworxExtensionApiMethod(since={6,6}) public void DeleteMember(String member, String type) throws Exception - Throws:
Exception
- If an error occurs
-
GetMembers
- Throws:
Exception
- If an error occurs
-
GetMember
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetMember(String member) throws Exception - Throws:
Exception
- If an error occurs
-
QueryMembers
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryMembers(org.json.JSONObject types, String filter, Double maxItems) throws Exception - Throws:
Exception
- If an error occurs
-
getMembers
-
toInfoTable
-
fromJSON
@ThingworxExtensionApiMethod(since={6,6}) public static OrganizationalUnit fromJSON(org.json.JSONObject jsonObject) throws Exception - Throws:
Exception
- If an error occurs
-
toJSON
- Throws:
Exception
- If an error occurs
-