public class PolicyPrivilegeManager extends PrivilegeManager
PrivilegeManager
that saves privileges as com.sun.identity.policy
objectsdebug, superAdminSubject
Constructor and Description |
---|
PolicyPrivilegeManager(ApplicationServiceFactory applicationServiceFactory,
ResourceTypeService resourceTypeService,
ConstraintValidator constraintValidator,
NotificationBroker broker,
NotificationsConfig notificationsConfig)
Creates instance of
PolicyPrivilegeManager |
Modifier and Type | Method and Description |
---|---|
void |
add(Privilege privilege)
Add a privilege.
|
List<Privilege> |
findAllPolicies()
Finds all policies within the realm.
|
List<Privilege> |
findAllPoliciesByApplication(String application)
Finds all policies within the realm and passed application.
|
List<Privilege> |
findAllPoliciesByIdentityUid(String uid)
Finds all policies based on the identity uid, whether user or group uid.
|
Privilege |
findByName(String name)
Finds a privilege by its unique name.
|
Privilege |
findByName(String privilegeName,
Subject adminSubject)
Returns a privilege.
|
void |
initialize(String realm,
Subject subject)
Initializes the object
|
void |
modify(Privilege privilege)
Modify a privilege.
|
void |
modify(String existingName,
Privilege privilege)
Modify a privilege.
|
protected void |
notifyPrivilegeChanged(String realm,
Privilege previous,
Privilege current,
PolicyEventType eventType) |
void |
remove(String name)
Remove a privilege.
|
canFindByName, getAdminSubject, getInstance, getRealm, isNameValid, search, search, searchNames, searchNames, validate
@Inject public PolicyPrivilegeManager(ApplicationServiceFactory applicationServiceFactory, ResourceTypeService resourceTypeService, ConstraintValidator constraintValidator, NotificationBroker broker, NotificationsConfig notificationsConfig)
PolicyPrivilegeManager
public void initialize(String realm, Subject subject)
initialize
in class PrivilegeManager
subject
- subject that would be used for privilege management
operationsrealm
- Realm namepublic Privilege findByName(String name) throws EntitlementException
name
- name of the privilege to be returnedEntitlementException
- if privilege is not found.public Privilege findByName(String privilegeName, Subject adminSubject) throws EntitlementException
PrivilegeManager
findByName
in class PrivilegeManager
privilegeName
- name for the privilege to be returnedadminSubject
- Subject to be used to obtain the privilege.EntitlementException
- if privilege is not found or if the provided subject is not permitted to access it.public List<Privilege> findAllPolicies() throws EntitlementException
PrivilegeManager
findAllPolicies
in class PrivilegeManager
EntitlementException
- should some error occurpublic List<Privilege> findAllPoliciesByApplication(String application) throws EntitlementException
PrivilegeManager
findAllPoliciesByApplication
in class PrivilegeManager
application
- the applicationEntitlementException
- should some error occurpublic List<Privilege> findAllPoliciesByIdentityUid(String uid) throws EntitlementException
PrivilegeManager
findAllPoliciesByIdentityUid
in class PrivilegeManager
uid
- identity uidEntitlementException
- should some query error occurpublic void add(Privilege privilege) throws EntitlementException
add
in interface IPrivilegeManager<Privilege>
add
in class PrivilegeManager
privilege
- privilege to add.EntitlementException
- if privilege cannot be added.public void remove(String name) throws EntitlementException
name
- name of the privilege to be removed.EntitlementException
- if privilege cannot be removed.public void modify(String existingName, Privilege privilege) throws EntitlementException
modify
in class PrivilegeManager
existingName
- the name with which the privilege is currently storedprivilege
- the privilege to be modifiedEntitlementException
- if privilege cannot be modified.public void modify(Privilege privilege) throws EntitlementException
privilege
- the privilege to be modifiedEntitlementException
- if privilege cannot be modified.protected void notifyPrivilegeChanged(String realm, Privilege previous, Privilege current, PolicyEventType eventType) throws EntitlementException
notifyPrivilegeChanged
in class PrivilegeManager
EntitlementException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.