public class PermissionSet extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
PermissionSet.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static String |
AUTHORITY |
static Parcelable.Creator<PermissionSet> |
CREATOR |
static JSONifiable.Creator<PermissionSet> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
PermissionSet()
Constructs a new empty instance.
|
protected |
PermissionSet(boolean noInit)
Constructs a new empty instance.
|
|
PermissionSet(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
reflected in this instance and vice-versa.
|
|
PermissionSet(PermissionSet src)
Constructs a new instance that is a deep copy of the source instance.
|
|
PermissionSet(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearApp()
Clears the 'app' field, the 'has' method for this field will now return false
|
void |
clearEmployeeDefault()
Clears the 'employeeDefault' field, the 'has' method for this field will now return false
|
void |
clearEmployeePermissions()
Clears the 'employeePermissions' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearLabel()
Clears the 'label' field, the 'has' method for this field will now return false
|
void |
clearManagerDefault()
Clears the 'managerDefault' field, the 'has' method for this field will now return false
|
void |
clearModule()
Clears the 'module' field, the 'has' method for this field will now return false
|
void |
clearName()
Clears the 'name' field, the 'has' method for this field will now return false
|
void |
clearPermissions()
Clears the 'permissions' field, the 'has' method for this field will now return false
|
void |
clearRoles()
Clears the 'roles' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
PermissionSet |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Reference |
getApp() |
Boolean |
getEmployeeDefault() |
List<EmployeePermission> |
getEmployeePermissions() |
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
JSONObject |
getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
reflected in this instance and vice-versa.
|
String |
getLabel()
Label of the permissionSet
|
Boolean |
getManagerDefault() |
Reference |
getModule()
The module associated with this permission set (if any)
|
String |
getName()
Key of the permissionSet
|
Permissions |
getPermissions()
Bitmap of permissions
|
List<Reference> |
getRoles()
roles enabled for this merchant
|
boolean |
hasApp()
Checks whether the 'app' field has been set, however the value could be null
|
boolean |
hasEmployeeDefault()
Checks whether the 'employeeDefault' field has been set, however the value could be null
|
boolean |
hasEmployeePermissions()
Checks whether the 'employeePermissions' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasLabel()
Checks whether the 'label' field has been set, however the value could be null
|
boolean |
hasManagerDefault()
Checks whether the 'managerDefault' field has been set, however the value could be null
|
boolean |
hasModule()
Checks whether the 'module' field has been set, however the value could be null
|
boolean |
hasName()
Checks whether the 'name' field has been set, however the value could be null
|
boolean |
hasPermissions()
Checks whether the 'permissions' field has been set, however the value could be null
|
boolean |
hasRoles()
Checks whether the 'roles' field has been set, however the value could be null
|
boolean |
isNotEmptyEmployeePermissions()
Checks whether the 'employeePermissions' field is set and is not null and is not empty
|
boolean |
isNotEmptyRoles()
Checks whether the 'roles' field is set and is not null and is not empty
|
boolean |
isNotNullApp()
Checks whether the 'app' field is set and is not null
|
boolean |
isNotNullEmployeeDefault()
Checks whether the 'employeeDefault' field is set and is not null
|
boolean |
isNotNullEmployeePermissions()
Checks whether the 'employeePermissions' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullLabel()
Checks whether the 'label' field is set and is not null
|
boolean |
isNotNullManagerDefault()
Checks whether the 'managerDefault' field is set and is not null
|
boolean |
isNotNullModule()
Checks whether the 'module' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullPermissions()
Checks whether the 'permissions' field is set and is not null
|
boolean |
isNotNullRoles()
Checks whether the 'roles' field is set and is not null
|
void |
mergeChanges(PermissionSet src)
Copy all the changed fields from the given source to this instance.
|
void |
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
|
PermissionSet |
setApp(Reference app)
Sets the field 'app'.
|
PermissionSet |
setEmployeeDefault(Boolean employeeDefault)
Sets the field 'employeeDefault'.
|
PermissionSet |
setEmployeePermissions(List<EmployeePermission> employeePermissions)
Sets the field 'employeePermissions'.
|
PermissionSet |
setId(String id)
Sets the field 'id'.
|
PermissionSet |
setLabel(String label)
Sets the field 'label'.
|
PermissionSet |
setManagerDefault(Boolean managerDefault)
Sets the field 'managerDefault'.
|
PermissionSet |
setModule(Reference module)
Sets the field 'module'.
|
PermissionSet |
setName(String name)
Sets the field 'name'.
|
PermissionSet |
setPermissions(Permissions permissions)
Sets the field 'permissions'.
|
PermissionSet |
setRoles(List<Reference> roles)
Sets the field 'roles'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final String AUTHORITY
public static final Parcelable.Creator<PermissionSet> CREATOR
public static final JSONifiable.Creator<PermissionSet> JSON_CREATOR
public PermissionSet()
protected PermissionSet(boolean noInit)
public PermissionSet(String json) throws IllegalArgumentException
IllegalArgumentException
public PermissionSet(JSONObject jsonObject)
public PermissionSet(PermissionSet src)
public String getId()
public String getName()
public String getLabel()
public Reference getApp()
public Boolean getEmployeeDefault()
public Boolean getManagerDefault()
public Permissions getPermissions()
public List<EmployeePermission> getEmployeePermissions()
public Reference getModule()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullName()
public boolean isNotNullLabel()
public boolean isNotNullApp()
public boolean isNotNullEmployeeDefault()
public boolean isNotNullManagerDefault()
public boolean isNotNullPermissions()
public boolean isNotNullEmployeePermissions()
public boolean isNotEmptyEmployeePermissions()
public boolean isNotNullRoles()
public boolean isNotEmptyRoles()
public boolean isNotNullModule()
public boolean hasId()
public boolean hasName()
public boolean hasLabel()
public boolean hasApp()
public boolean hasEmployeeDefault()
public boolean hasManagerDefault()
public boolean hasPermissions()
public boolean hasEmployeePermissions()
public boolean hasRoles()
public boolean hasModule()
public PermissionSet setId(String id)
public PermissionSet setName(String name)
public PermissionSet setLabel(String label)
public PermissionSet setApp(Reference app)
public PermissionSet setEmployeeDefault(Boolean employeeDefault)
public PermissionSet setManagerDefault(Boolean managerDefault)
public PermissionSet setPermissions(Permissions permissions)
public PermissionSet setEmployeePermissions(List<EmployeePermission> employeePermissions)
public PermissionSet setRoles(List<Reference> roles)
public PermissionSet setModule(Reference module)
public void clearId()
public void clearName()
public void clearLabel()
public void clearApp()
public void clearEmployeeDefault()
public void clearManagerDefault()
public void clearPermissions()
public void clearEmployeePermissions()
public void clearRoles()
public void clearModule()
public boolean containsChanges()
public void resetChangeLog()
public PermissionSet copyChanges()
public void mergeChanges(PermissionSet src)