Class OrganizationalUnit
- java.lang.Object
-
- com.thingworx.types.NamedObject
-
- com.thingworx.security.organizations.OrganizationalUnit
-
- All Implemented Interfaces:
IDiffableObject
,INamedObject
,java.io.Serializable
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class OrganizationalUnit extends NamedObject
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description OrganizationalUnit()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
AddMember(java.lang.String member, java.lang.String type)
Service Category: Members Service Description: Add a user/group to this Organizational Unit.void
AssignMembers(InfoTable members)
void
DeleteMember(java.lang.String member, java.lang.String type)
static OrganizationalUnit
fromJSON(org.json.JSONObject jsonObject)
InfoTable
GetMember(java.lang.String member)
EntityReferenceTypeMap
getMembers()
InfoTable
GetMembers()
InfoTable
QueryMembers(org.json.JSONObject types, java.lang.String filter, java.lang.Double maxItems)
InfoTable
toInfoTable()
org.json.JSONObject
toJSON()
-
Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
-
-
-
-
Method Detail
-
AssignMembers
@ThingworxExtensionApiMethod(since={6,6}) public void AssignMembers(InfoTable members) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
AddMember
@ThingworxExtensionApiMethod(since={6,6}) public void AddMember(java.lang.String member, java.lang.String type) throws java.lang.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:
java.lang.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(java.lang.String member, java.lang.String type) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
GetMembers
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetMembers() throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
GetMember
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetMember(java.lang.String member) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
QueryMembers
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryMembers(org.json.JSONObject types, java.lang.String filter, java.lang.Double maxItems) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
getMembers
@ThingworxExtensionApiMethod(since={6,6}) public EntityReferenceTypeMap getMembers()
-
toInfoTable
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable toInfoTable()
-
fromJSON
@ThingworxExtensionApiMethod(since={6,6}) public static OrganizationalUnit fromJSON(org.json.JSONObject jsonObject) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
toJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject toJSON() throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
-