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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidService Category: Members Service Description: Add a user/group to this Organizational Unit.voidAssignMembers(InfoTable members) voidDeleteMember(String member, String type) static OrganizationalUnitfromJSON(org.json.JSONObject jsonObject) QueryMembers(org.json.JSONObject types, String filter, Double maxItems) org.json.JSONObjecttoJSON()Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
-
Constructor Details
-
OrganizationalUnit
public OrganizationalUnit()Initializes this instace with default values.
-
-
Method Details
-
AssignMembers
@ThingworxExtensionApiMethod(since={6,6}) public void AssignMembers(InfoTable members) throws Exception - Throws:
Exception
-
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 occursAdditional Information: Adds a user/group, but does not persist this information to this organizational unit. A server restart will revert the changes unless
Organization.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
-
GetMembers
- Throws:
Exception
-
GetMember
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetMember(String member) throws Exception - Throws:
Exception
-
QueryMembers
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryMembers(org.json.JSONObject types, String filter, Double maxItems) throws Exception - Throws:
Exception
-
getMembers
-
toInfoTable
-
fromJSON
@ThingworxExtensionApiMethod(since={6,6}) public static OrganizationalUnit fromJSON(org.json.JSONObject jsonObject) throws Exception - Throws:
Exception
-
toJSON
- Throws:
Exception
-