public abstract class Principal extends GeneratedPrincipal
UserRights on one Item, which can be checked by the
AccessManager.GenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException| Modifier and Type | Field and Description |
|---|---|
static String |
ALLGROUPS
Deprecated.
Old Jalo attribute that is now dynamic.
|
static String |
ALLSEARCHRESTRICTIONS
Deprecated.
it is a dynamic attribute now
|
static String |
DISPLAYNAME
Deprecated.
it is a dynamic attribute now
|
static String |
PRINCIPAL_GROUP_RELATION_NAME
Deprecated.
use instead CoreConstants.Relations.PRINCIPALGROUPRELATION
|
DEFAULT_INITIAL_ATTRIBUTES, DESCRIPTION, GROUPS, NAME, PRINCIPALGROUPRELATION_MARKMODIFIED, PRINCIPALGROUPRELATION_SRC_ORDERED, PRINCIPALGROUPRELATION_TGT_ORDERED, SEARCHRESTRICTIONS, SEARCHRESTRICTIONSHANDLER, UIDLANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
Principal() |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalNegativePermission(UserRight permission)
|
void |
addGlobalPermission(UserRight permission,
boolean deny)
|
boolean |
addGlobalPermissions(Collection<PermissionContainer> permissions)
Deprecated.
|
void |
addGlobalPositivePermission(UserRight permission)
|
boolean |
addToGroup(PrincipalGroup group)
Deprecated.
|
protected void |
checkConsistencyUid(String uid,
String message,
String composedTypeCode) |
boolean |
checkGlobalPermission(UserRight right)
|
int |
checkOwnGlobalPermission(PK userRightPK)
Deprecated.
|
abstract void |
checkSystemPrincipal() |
void |
clearGlobalPermission(UserRight permission)
|
boolean |
clearGlobalPermissions(Collection<PermissionContainer> permissions)
Deprecated.
|
Map<Language,String> |
getAllDisplayName()
Deprecated.
|
abstract Map<Language,String> |
getAllDisplayName(SessionContext ctx)
Deprecated.
|
Collection |
getAllGlobalNegativePermissions()
Gets all negative permissions of this principal including all negative permissions of groups the principal is
member of.
|
Collection |
getAllGlobalPositivePermissions()
Gets all positive permissions of this principal including all positive permissions of groups the principal is
member of.
|
Set<PrincipalGroup> |
getAllGroups() |
Set<PrincipalGroup> |
getAllGroups(SessionContext ctx)
Gets all groups this principal is member of ( transitive ! ).
|
Collection<SearchRestriction> |
getAllSearchRestrictions()
Gets all search restrictions of this principal.
|
Collection<SearchRestriction> |
getAllSearchRestrictions(SessionContext ctx)
Gets all search restrictions of this principal.
|
String |
getDisplayName()
Deprecated.
use
PrincipalModel.getDisplayName()
Old jalo generated method from GeneratedPrincipal - Getter of the
Principal.displayName jalo localized attribute. |
abstract String |
getDisplayName(SessionContext ctx)
Deprecated.
use
PrincipalModel.getDisplayName()
Old jalo generated method from GeneratedPrincipal - Getter of the
Principal.displayName jalo localized attribute. |
Set |
getGlobalNegativePermissions()
Gets all negative permissions of this principal.
|
Set |
getGlobalPermissions(boolean negative)
|
Set |
getGlobalPositivePermissions()
Gets all positive permissions of this principal.
|
Set<PrincipalGroup> |
getGroups(SessionContext ctx)
Gets all groups which this user belongs to.
|
Map |
getItemPermissionsMap(List userRights)
Returns all stored permissions for this principal and a given list of user rights.
|
String |
getUID()
Deprecated.
use
GeneratedPrincipal.getUid() instead |
String |
getUid(SessionContext ctx)
Generated method - Getter of the
Principal.uid attribute. |
abstract boolean |
isAdmin()
Checks whether the Principal is the admin user.
|
boolean |
isMemberOf(PrincipalGroup g)
Deprecated.
|
boolean |
isMemberOf(PrincipalGroup grp,
boolean includingSupergroups)
|
void |
remove(SessionContext ctx)
SLDSafe - previously there was an intentional bug that deleted all the addresses after User was deleted - even
those that are duplicates with the original field set.
|
boolean |
removeFromGroup(PrincipalGroup group)
Deprecated.
|
void |
setGroups(SessionContext ctx,
Set groups)
Sets the users memberships in the given groups.
|
void |
setItemPermissionsByMap(List userRights,
Map permissionMap)
Changes all stored permissions for this principal and a given list of user rights at once.
|
void |
setUID(String uid)
Deprecated.
|
String |
toString()
Returns the
String representation of this item. |
addToGroups, addToGroups, getDefaultAttributeModes, getDescription, getDescription, getGroups, getGroupsCount, getGroupsCount, getName, getName, getSearchRestrictions, getSearchRestrictions, getUid, removeFromGroups, removeFromGroups, setDescription, setDescription, setGroups, setName, setName, setUid, setUidcreateItem, getInitialProperties, getNonInitialAttributesgetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyaddLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, readResolve, refreshRemote, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, useTA, writeReplacegetImplementation, setTenant@Deprecated public static final String DISPLAYNAME
displayName attribute of User type.@Deprecated public static final String ALLSEARCHRESTRICTIONS
allSearchRestrictions attribute of User type.@Deprecated public static final String PRINCIPAL_GROUP_RELATION_NAME
PrincipalGroupRelation type.@Deprecated public static final String ALLGROUPS
public String toString()
ItemString representation of this item. This is by default the representation of the primary
key of this item.@Deprecated public String getUID()
GeneratedPrincipal.getUid() insteadprotected void checkConsistencyUid(String uid, String message, String composedTypeCode) throws ConsistencyCheckException
ConsistencyCheckExceptionpublic String getUid(SessionContext ctx)
GeneratedPrincipalPrincipal.uid attribute.getUid in class GeneratedPrincipal@Deprecated public void setUID(String uid) throws ConsistencyCheckException
GeneratedPrincipal.setUid(SessionContext, String) insteadConsistencyCheckException - if there is already a principal with this idpublic abstract void checkSystemPrincipal()
throws ConsistencyCheckException
ConsistencyCheckExceptionpublic Set<PrincipalGroup> getGroups(SessionContext ctx)
getGroups in class GeneratedPrincipalPrincipalGroups the user is member inpublic Set<PrincipalGroup> getAllGroups()
public Set<PrincipalGroup> getAllGroups(SessionContext ctx)
PrincipalGroups this principal is member of ( transitive ! )@Deprecated public boolean isMemberOf(PrincipalGroup grp, boolean includingSupergroups)
includingSupergroups - if true indirect membership through group-in-group is evaluated, otherwise only direct
membershipgrp - the group to check membership forisMemberOf(PrincipalGroup)public void setGroups(SessionContext ctx, Set groups)
setGroups in class GeneratedPrincipalgroups - - the groups the user should be member in@Deprecated public boolean addToGroup(PrincipalGroup group)
GeneratedPrincipal.addToGroups(SessionContext, PrincipalGroup) instead@Deprecated public boolean removeFromGroup(PrincipalGroup group)
GeneratedPrincipal.removeFromGroups(SessionContext, PrincipalGroup) instead@Deprecated public boolean isMemberOf(PrincipalGroup g)
UserService.isMemberOfGroup(UserModel, UserGroupModel, boolean)g - the group to check membership forisMemberOf(PrincipalGroup, boolean)public Collection<SearchRestriction> getAllSearchRestrictions()
public Collection<SearchRestriction> getAllSearchRestrictions(SessionContext ctx)
public Map getItemPermissionsMap(List userRights)
The result map contains all items which this principal owns stored permissions for as keys, and a list of
Boolean objects ordered according to the given user rights list. These objects have the following meaning:
Boolean.TRUE ... a negative permission is storedBoolean.FALSE ... a positive permission is stored null ... no permission is stored for the according user rightItem.getPermissionMap(List). public void setItemPermissionsByMap(List userRights, Map permissionMap)
The argument map must contain all items which this principal owns stored permissions for as keys, and a list of
Boolean objects ordered according to the given user rights list. These objects have the following meaning:
Boolean.TRUE ... a negative permission is storedBoolean.FALSE ... a positive permission is stored null ... no permission is stored for the according user rightItem.setPermissionsByMap(List, Map). @Deprecated public void addGlobalPermission(UserRight permission, boolean deny)
@Deprecated public boolean addGlobalPermissions(Collection<PermissionContainer> permissions)
PermissionManagementService.addGlobalPermissions(Collection)@Deprecated public void addGlobalNegativePermission(UserRight permission)
@Deprecated public void addGlobalPositivePermission(UserRight permission)
@Deprecated public void clearGlobalPermission(UserRight permission)
@Deprecated public boolean clearGlobalPermissions(Collection<PermissionContainer> permissions)
PermissionManagementService.removeGlobalPermissions(Collection)@Deprecated public Set getGlobalPermissions(boolean negative)
public Set getGlobalPositivePermissions()
public Set getGlobalNegativePermissions()
public Collection getAllGlobalPositivePermissions()
public Collection getAllGlobalNegativePermissions()
public abstract boolean isAdmin()
@Deprecated public int checkOwnGlobalPermission(PK userRightPK)
(PrincipalModel, String)@Deprecated public boolean checkGlobalPermission(UserRight right)
public void remove(SessionContext ctx) throws ConsistencyCheckException
partOf takes care of deleting them.remove in class Itemctx - A SessionContext objectConsistencyCheckException@Deprecated public abstract String getDisplayName(SessionContext ctx)
PrincipalModel.getDisplayName()
Old jalo generated method from GeneratedPrincipal - Getter of the
Principal.displayName jalo localized attribute.@Deprecated public String getDisplayName()
PrincipalModel.getDisplayName()
Old jalo generated method from GeneratedPrincipal - Getter of the
Principal.displayName jalo localized attribute.@Deprecated public abstract Map<Language,String> getAllDisplayName(SessionContext ctx)
Principal.displayName jalo
localized attribute.@Deprecated public Map<Language,String> getAllDisplayName()
Principal.displayName jalo
localized attribute.Copyright © 2017 SAP SE. All Rights Reserved.