public class ServiceAccessRightManagement extends AbstractLangridService implements ServiceAccessRightManagementService
Constructor and Description |
---|
ServiceAccessRightManagement()
Constructor.
|
ServiceAccessRightManagement(ServiceContext serviceContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deletes access privilege data.
|
void |
deleteAccessRight(String userId,
String serviceId)
Deletes access privilege.
|
AccessRight |
getMyAccessRight(String serviceId)
Searches access privilege data of the called user.
|
AccessRightSearchResult |
searchAccessRights(int startIndex,
int maxCount,
String userId,
String serviceId,
Order[] orders)
Searches access privilege data over the specified conditions, sorts and returns.
|
void |
setAccessRight(String userId,
String serviceId,
boolean permitted)
Sets access privilege.
|
adjustDateFieldName, adjustDateFieldName, convert, convertException, convertException, convertException, convertException, convertException, convertException, convertException, convertException, convertException, convertUserOrder, copyAttributes, copyAttributes, copyProperties, getAccessLimitDao, getAccessLogDao, getAccessRightDao, getAccessStateDao, getConverter, getCoreNodeUrl, getDaoContext, getDaoFactory, getDefaultGridId, getFederationDao, getGridDao, getGridId, getNodeDao, getOverUseLimitDao, getOverUseStateDao, getResourceDao, getServiceContext, getServiceDao, getServiceDeploymentDao, getServiceLogic, getSystemPropertyDao, getTargetServiceIds, getTemporaryUserDao, getUserChecker, getUserDao, getUserLogic, unsetFactory
public ServiceAccessRightManagement()
public ServiceAccessRightManagement(ServiceContext serviceContext)
serviceContext
- Service context@AccessRightValidatedMethod(policy=ADMINONLY) @TransactionMethod public void clear() throws AccessLimitExceededException, NoAccessPermissionException, ServiceConfigurationException, UnknownException
ServiceAccessRightManagementService
clear
in interface ServiceAccessRightManagementService
AccessLimitExceededException
- Violated an access restrictionNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- The service setup was not done appropriatelyUnknownException
- An unexpected exception occurred@ValidatedMethod @AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN, argNames="serviceId") @TransactionMethod public AccessRightSearchResult searchAccessRights(@IntNotNegative int startIndex, @IntInRange(minimum=0,maximum=100) int maxCount, @NotNull@ValidUserId(allowWildcard=true,allowEmpty=true) String userId, @NotNull@ValidServiceId(allowWildcard=true,allowEmpty=true) String serviceId, @NotNull@EachElement@ValidOrder Order[] orders) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, UnknownException
When userId and serviceId are omitted, specifies an empty string. When userId is omitted, search data of all users. When serviceId is omitted, search data of all services registered by the user calling this method.
searchAccessRights
in interface ServiceAccessRightManagementService
startIndex
- Starting position of result acquisitionmaxCount
- Maximum number of acquired resultsuserId
- Target user ID for searching access privilegeserviceId
- Target service IDs of searched access privilegesorders
- Sort conditionAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- The service setup was not done appropriatelyUnknownException
- An unexpected exception occurred@AccessRightValidatedMethod @TransactionMethod @ValidatedMethod public AccessRight getMyAccessRight(@NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, UnknownException
ServiceAccessRightManagementService
getMyAccessRight
in interface ServiceAccessRightManagementService
serviceId
- Service IDAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- The service setup was not done appropriatelyUnknownException
- An unexpected exception occurred@AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN, argNames="serviceId") @TransactionMethod @ValidatedMethod public void setAccessRight(@NotEmpty@ValidUserId(allowWildcard=true) String userId, @NotEmpty@ValidServiceId String serviceId, boolean permitted) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, UnknownException
By setting userID to "*", you can set the service's defined value of the service (the value applied to newly added services).
setAccessRight
in interface ServiceAccessRightManagementService
userId
- User IDserviceId
- Service IDpermitted
- Whether permitted or notAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- The service setup was not done appropriatelyUnknownException
- An unexpected exception occurred@ValidatedMethod @AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN, argNames="serviceId") @TransactionMethod public void deleteAccessRight(@NotEmpty@ValidUserId String userId, @NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, AccessRightNotFoundException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, UnknownException
ServiceAccessRightManagementService
deleteAccessRight
in interface ServiceAccessRightManagementService
userId
- Target user ID of the access privilege to be deleted. To specify all, use "*"serviceId
- Target service IDs of access privileges to be deleted. To specify all, use "*"AccessLimitExceededException
- Violated an access restrictionAccessRightNotFoundException
- The access privilege does not existInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- The service setup was not done appropriatelyUnknownException
- An unexpected exception occurred