Class ComponentPermissions
- java.lang.Object
- 
- com.inductiveautomation.vision.api.client.components.model.security.ComponentPermissions
 
- 
 public class ComponentPermissions extends java.lang.Object
- 
- 
Field SummaryFields Modifier and Type Field Description static ComponentRestrictionACCESS_DENIED_OVERLAYShared instance of the component restriction that displays an opaque access denied overlaystatic ComponentPermissionsDEFAULT_PERMISSIONSstatic ComponentRestrictionDISABLEShared instance of the component restriction that disables a componentstatic ComponentRestrictionDISABLE_SCRIPTSShared instance of the component restriction that disables event scriptsstatic ComponentRestrictionHIDEShared instance of the component restriction that hides a component
 - 
Constructor SummaryConstructors Constructor Description ComponentPermissions()For serialization only.ComponentPermissions(boolean inheritPermissions, java.lang.String[] requiredRoles, ComponentRestriction[] restrictions)ComponentPermissions(SecuritySettings legacy)Creates a component permissions object based on a legacy SecuritySetttings objectComponentPermissions(ComponentPermissions copy)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentPermissionscreateInvertedCopy(java.util.List<java.lang.String> roles)booleanequals(java.lang.Object obj)static ComponentPermissionsfromJson(com.inductiveautomation.ignition.common.gson.JsonElement json)static ComponentPermissionsget(javax.swing.JComponent component)Fetch the security settings for this component.java.lang.String[]getRequiredRoles()ComponentRestriction[]getRestrictions()booleanhasAccess(java.util.List<java.lang.String> roles)Checks whether or not a user with the given roles has access according to the permissions represented by this object.booleanisInheritPermissions()booleanisInvertRoles()static voidset(javax.swing.JComponent component, ComponentPermissions permissions)Set the permissions on a component.voidsetInheritPermissions(boolean inheritPermissions)voidsetInvertRoles(boolean invertRoles)voidsetRequiredRoles(java.lang.String[] requiredRoles)voidsetRestrictions(ComponentRestriction[] restrictions)com.inductiveautomation.ignition.common.gson.JsonElementtoJson()
 
- 
- 
- 
Field Detail- 
DISABLEpublic static final ComponentRestriction DISABLE Shared instance of the component restriction that disables a component
 - 
HIDEpublic static final ComponentRestriction HIDE Shared instance of the component restriction that hides a component
 - 
DISABLE_SCRIPTSpublic static final ComponentRestriction DISABLE_SCRIPTS Shared instance of the component restriction that disables event scripts
 - 
ACCESS_DENIED_OVERLAYpublic static final ComponentRestriction ACCESS_DENIED_OVERLAY Shared instance of the component restriction that displays an opaque access denied overlay
 - 
DEFAULT_PERMISSIONSpublic static final ComponentPermissions DEFAULT_PERMISSIONS 
 
- 
 - 
Constructor Detail- 
ComponentPermissionspublic ComponentPermissions() For serialization only.
 - 
ComponentPermissionspublic ComponentPermissions(ComponentPermissions copy) 
 - 
ComponentPermissionspublic ComponentPermissions(boolean inheritPermissions, java.lang.String[] requiredRoles, ComponentRestriction[] restrictions)
 - 
ComponentPermissionspublic ComponentPermissions(SecuritySettings legacy) Creates a component permissions object based on a legacy SecuritySetttings object
 
- 
 - 
Method Detail- 
getpublic static ComponentPermissions get(javax.swing.JComponent component) Fetch the security settings for this component. If none have been set, a default configuration will be returned. This function automatically converts the legacy style SecuritySettings into a ComponentPermissions object.
 - 
setpublic static void set(javax.swing.JComponent component, ComponentPermissions permissions)Set the permissions on a component.
 - 
toJsonpublic com.inductiveautomation.ignition.common.gson.JsonElement toJson() 
 - 
fromJsonpublic static ComponentPermissions fromJson(com.inductiveautomation.ignition.common.gson.JsonElement json) 
 - 
hasAccesspublic boolean hasAccess(java.util.List<java.lang.String> roles) Checks whether or not a user with the given roles has access according to the permissions represented by this object. Only checks if inherit=false, that is, doesn't implement inheritance checking
 - 
createInvertedCopypublic ComponentPermissions createInvertedCopy(java.util.List<java.lang.String> roles) 
 - 
isInvertRolespublic boolean isInvertRoles() 
 - 
setInvertRolespublic void setInvertRoles(boolean invertRoles) 
 - 
isInheritPermissionspublic boolean isInheritPermissions() 
 - 
setInheritPermissionspublic void setInheritPermissions(boolean inheritPermissions) 
 - 
getRequiredRolespublic java.lang.String[] getRequiredRoles() 
 - 
setRequiredRolespublic void setRequiredRoles(java.lang.String[] requiredRoles) 
 - 
getRestrictionspublic ComponentRestriction[] getRestrictions() 
 - 
setRestrictionspublic void setRestrictions(ComponentRestriction[] restrictions) 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 
- 
 
-