public class DefaultUIAccessRightService extends AbstractServiceImpl implements UIAccessRightService
| Modifier and Type | Field and Description |
|---|---|
protected CockpitUIComponentAccessRightDao |
cockpitUIComponentAccessRightDao |
modelService, typeService| Constructor and Description |
|---|
DefaultUIAccessRightService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(UserModel user,
java.lang.String componentCode)
Returns whether a specific user has read access to a specific Cockpit component or not.
|
boolean |
canWrite(UserModel user,
CatalogVersionModel catVersion)
Returns whether a specific user has write access to a specific catalog version or not.
|
boolean |
canWrite(UserModel user,
java.lang.String componentCode)
Returns whether a specific user has write access to a specific Cockpit component or not.
|
protected java.lang.String |
getBaseTypeCode(ObjectType type,
ItemAttributePropertyDescriptor descr) |
protected SessionContext |
getSessionContext() |
SystemService |
getSystemService() |
UserService |
getUserService() |
boolean |
isReadable(ObjectType type)
Returns whether the current user has read access to the specified type.
|
boolean |
isReadable(ObjectType type,
PropertyDescriptor propDescr,
boolean creationMode)
Returns whether the current user has read access to the specified property.
|
boolean |
isWritable(ObjectType type)
Returns whether the current user has write access to the specified type.
|
boolean |
isWritable(ObjectType type,
PropertyDescriptor propDescr,
boolean creationMode)
Returns whether the current user has write access to the specified item property.
|
boolean |
isWritable(ObjectType type,
TypedObject item)
Returns whether the current user has write access to the specified item.
|
boolean |
isWritable(ObjectType type,
TypedObject item,
PropertyDescriptor propDescr,
boolean creationMode)
Returns whether the current user has write access to the specified item property.
|
protected boolean |
restricts(java.util.Collection<PrincipalModel> principals,
UserModel user) |
void |
setCockpitUIComponentAccessRightDao(CockpitUIComponentAccessRightDao cockpitUIComponentAccessRightDao) |
void |
setSystemService(SystemService systemService) |
void |
setUserService(UserService userService) |
getEnum, getEnums, getLocalizedLabel, getLocalizedLabel, getModelService, getTypeService, setCockpitTypeService, setLabelResolver, setModelServiceprotected CockpitUIComponentAccessRightDao cockpitUIComponentAccessRightDao
public boolean canRead(UserModel user, java.lang.String componentCode)
UIAccessRightServicecanRead in interface UIAccessRightServiceuser - the user to check access forcomponentCode - the unique code of the componenttrue if the user has read access to the specified component, otherwise falsepublic boolean canWrite(UserModel user, java.lang.String componentCode)
UIAccessRightServicecanWrite in interface UIAccessRightServiceuser - the user to check access forcomponentCode - the unique code of the componenttrue if the user has write access to the specified component, otherwise falseprotected boolean restricts(java.util.Collection<PrincipalModel> principals, UserModel user)
public void setCockpitUIComponentAccessRightDao(CockpitUIComponentAccessRightDao cockpitUIComponentAccessRightDao)
public void setUserService(UserService userService)
public UserService getUserService()
public boolean isReadable(ObjectType type)
UIAccessRightServiceisReadable in interface UIAccessRightServicetype - the type to check access fortrue if user has read access, false otherwisepublic boolean isReadable(ObjectType type, PropertyDescriptor propDescr, boolean creationMode)
UIAccessRightServiceisReadable in interface UIAccessRightServicetype - item typepropDescr - item attribute to check access forcreationMode - creation mode or nottrue if user has read access, false otherwisepublic boolean isWritable(ObjectType type)
UIAccessRightServiceisWritable in interface UIAccessRightServicetype - the type to check access fortrue if user has write access, false otherwisepublic boolean isWritable(ObjectType type, TypedObject item)
UIAccessRightServiceisWritable in interface UIAccessRightServicetype - item typeitem - the item instance to check access fortrue if user has write access, false otherwisepublic boolean isWritable(ObjectType type, TypedObject item, PropertyDescriptor propDescr, boolean creationMode)
UIAccessRightServiceisWritable in interface UIAccessRightServicetype - item typeitem - item instancepropDescr - item attribute to check access forcreationMode - creation mode or nottrue if user has write access, false otherwisepublic boolean isWritable(ObjectType type, PropertyDescriptor propDescr, boolean creationMode)
UIAccessRightServiceisWritable in interface UIAccessRightServicetype - item typepropDescr - item attribute to check access forcreationMode - creation mode or nottrue if user has write access, false otherwiseprotected java.lang.String getBaseTypeCode(ObjectType type, ItemAttributePropertyDescriptor descr)
public void setSystemService(SystemService systemService)
public SystemService getSystemService()
public boolean canWrite(UserModel user, CatalogVersionModel catVersion)
UIAccessRightServicecanWrite in interface UIAccessRightServiceuser - the user to check access forcatVersion - the catalog versiontrue if the user has write access, false otherwiseprotected SessionContext getSessionContext()
Copyright © 2018 SAP SE. All Rights Reserved.