public class ServiceManagement extends AbstractLangridService implements ServiceManagementService
Constructor and Description |
---|
ServiceManagement()
Constructor.
|
ServiceManagement(ServiceContext serviceContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activateService(String serviceId)
Makes service active.
|
void |
addService(String serviceId,
ServiceProfile profile,
ServiceInstance instance,
Attribute[] attributes)
Adds service.
|
void |
addServiceAs(String ownerUserId,
String serviceId,
ServiceProfile profile,
ServiceInstance instance,
Attribute[] attributes)
Sets the user with ownership and adds the service.
|
void |
clear()
Erase all services.
|
void |
deactivateService(String serviceId)
Makes service inactive.
|
void |
deleteService(String serviceId)
Deletes a registered service.
|
Invocation[] |
getExternalInvocations(String serviceId)
Gets external service call data.
|
Attribute[] |
getServiceAttributes(String serviceId,
String[] attributeNames)
Gets service attributes.
|
ServiceInstance |
getServiceInstance(String serviceId)
Gets data about the instance of the service.
|
ServiceProfile |
getServiceProfile(String serviceId)
Gets the service's profile data.
|
byte[] |
getServiceWsdl(String serviceId)
Gets the service's WSDL.
|
boolean |
isServiceActive(String serviceId)
Returns whether the service is active or not.
|
boolean |
isServiceVisible(String serviceId)
Returns whether the service is visible or not.
|
CompositeServiceEntrySearchResult |
searchCompositeServices(int startIndex,
int maxCount,
MatchingCondition[] conditions,
Order[] orders,
String scope)
Searches composite services.
|
ServiceEntrySearchResult |
searchServices(int startIndex,
int maxCount,
MatchingCondition[] conditions,
Order[] orders,
String scope)
Searches services over the specified conditions, sorts and returns.
|
ServiceEntryWithCompactLanguageExpressionSearchResult |
searchServicesWithCompactLanguageExpression(int startIndex,
int maxCount,
MatchingCondition[] conditions,
Order[] orders,
String scope)
Searches services over the specified conditions, sorts and returns.
|
void |
setServiceAttributes(String serviceId,
Attribute[] attributes)
Sets service attributes.
|
void |
setServiceInstance(String serviceId,
ServiceInstance instance)
Sets data about the instance of the service.
|
void |
setServiceProfile(String serviceId,
ServiceProfile profile)
Sets the service's profile data.
|
void |
setServiceVisible(String serviceId,
boolean visible)
Sets whether the service is visible or not.
|
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 ServiceManagement()
public ServiceManagement(ServiceContext serviceContext)
serviceContext
- Service context@AccessRightValidatedMethod(policy=ADMINONLY) @TransactionMethod public void clear() throws AccessLimitExceededException, NoAccessPermissionException, ServiceConfigurationException, UnknownException
ServiceManagementService
clear
in interface ServiceManagementService
AccessLimitExceededException
- Violated an access restrictionNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- The service is not set up appropriatelyUnknownException
- Process failed@AccessRightValidatedMethod @ValidatedMethod @TransactionMethod public ServiceEntrySearchResult searchServices(@IntNotNegative int startIndex, @IntInRange(minimum=0,maximum=100) int maxCount, @NotNull@EachElement@ValidMatchingCondition(supportedMatchingMethods={COMPLETE,PARTIAL,PREFIX,SUFFIX,LANGUAGEPATH,IN,EQ,GT,GE,LT,LE}) MatchingCondition[] conditions, @NotNull@EachElement@ValidOrder Order[] orders, @NotEmpty@ValidEnum(value=Scope.class) String scope) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, UnknownException, UnsupportedMatchingMethodException
ServiceManagementService
searchServices
in interface ServiceManagementService
startIndex
- Starting position of result acquisitionmaxCount
- Maximum number of acquired resultsconditions
- Matching conditions. AND searchorders
- Sort conditionscope
- Object range (scope)("ALL", "MINE", "ACCESSIBLE")AccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedUnsupportedMatchingMethodException
- An unsupported matching method was specifiedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- The service is not set up appropriatelyUnknownException
- Process failed for an unknown reason@AccessRightValidatedMethod @ValidatedMethod @TransactionMethod public ServiceEntryWithCompactLanguageExpressionSearchResult searchServicesWithCompactLanguageExpression(@IntNotNegative int startIndex, @IntInRange(minimum=0,maximum=100) int maxCount, @NotNull@EachElement@ValidMatchingCondition(supportedMatchingMethods={COMPLETE,PARTIAL,PREFIX,SUFFIX,LANGUAGEPATH,IN,EQ,GT,GE,LT,LE}) MatchingCondition[] conditions, @NotNull@EachElement@ValidOrder Order[] orders, @NotEmpty@ValidEnum(value=Scope.class) String scope) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, UnknownException, UnsupportedMatchingMethodException
ServiceManagementService
searchServicesWithCompactLanguageExpression
in interface ServiceManagementService
startIndex
- Starting position of result acquisitionmaxCount
- Maximum number of acquired resultsconditions
- Matching conditions. AND searchorders
- Sort conditionscope
- Object range (scope)("ALL", "MINE", "ACCESSIBLE")AccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedUnsupportedMatchingMethodException
- An unsupported matching method was specifiedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- The service is not set up appropriatelyUnknownException
- Process failed for an unknown reason@AccessRightValidatedMethod @ValidatedMethod @TransactionMethod public CompositeServiceEntrySearchResult searchCompositeServices(@IntNotNegative int startIndex, @IntInRange(minimum=0,maximum=100) int maxCount, @NotNull@EachElement@ValidMatchingCondition MatchingCondition[] conditions, @NotNull@EachElement@ValidOrder Order[] orders, @NotEmpty@ValidEnum(value=Scope.class) String scope) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, UnknownException, UnsupportedMatchingMethodException
Matching conditions can be set for the service's profile, instance, and attribute data.
In CompositeServiceEntry, from among the services the composite service refers to, the list of what is registered in the language grid is included (servicesInUse). The service's references are resolved at the time the composite service is registered.
startIndex
- Starting position of search resultsmaxCount
- Maximum number of search resultsconditions
- Matching conditionsorders
- Sort directionscope
- Object range (scope)("ALL", "MINE", "ACCESSIBLE")AccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- The service is not set up appropriatelyUnknownException
- Process failed for an unknown reasonUnsupportedMatchingMethodException
- An unsupported matching method was specified@AccessRightValidatedMethod(policy=ADMINONLY) @ValidatedMethod @TransactionMethod public void addService(@NotEmpty@ValidServiceId String serviceId, @NotNull ServiceProfile profile, @NotNull ServiceInstance instance, @NotNull@EachElement@ValidAttribute Attribute[] attributes) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceAlreadyExistsException, ServiceConfigurationException, UnknownException
For existing users, the access privileges of the services to be added will be set. When default access privilege data is included in attributes then they are set,if none it is set to "permitted". Access restrictions are not added at all.
When the added service is a composite service, the targetNamespace of the WSDL file it refers to Existing services are searched by this, and if found, added to the list of referred services. The return value of searchCompositeServices is included in this list. Used when the servicesInUse property of CompositeService is set.
Format of ServiceInstance#instanceIn the case of external services, stores the service's WSDL compressed as a jar (filename is "serviceID.wsdl"). If a composite service, the BPEL file ("serviceID.bpel")and the WSDL file group that refers to it Specifies a jar compressed ("foo.wsdl").
addService
in interface ServiceManagementService
serviceId
- Service IDprofile
- Service datainstance
- Service instance (Contents differ according to the type of service instance)attributes
- Service's extended attribute dataAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceAlreadyExistsException
- The specified service already existsServiceConfigurationException
- Process failed because service setup is invalidUnknownException
- Process failed@AccessRightValidatedMethod(policy=ADMINONLY) @ValidatedMethod @TransactionMethod public void addServiceAs(@NotEmpty@ValidUserId String ownerUserId, @NotEmpty@ValidServiceId String serviceId, @NotNull ServiceProfile profile, @NotNull ServiceInstance instance, @NotNull@EachElement@ValidAttribute Attribute[] attributes) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceAlreadyExistsException, ServiceConfigurationException, UnknownException
For existing users, the access privileges of the services to be added will be set. When default access privilege data is included in attributes then they are set,if none it is set to "permitted". Access restrictions are not added at all.
When the added service is a composite service, the targetNamespace of the WSDL file it refers to Existing services are searched by this, and if found, added to the list of referred services. The return value of searchCompositeServices is included in this list. Used when the servicesInUse property of CompositeService is set.
Format of ServiceInstance#instanceIn the case of external services, stores the service's WSDL compressed as a jar (filename is "serviceID.wsdl"). If a composite service, the BPEL file ("serviceID.bpel")and the WSDL file group that refers to it Specifies a jar compressed ("foo.wsdl").
addServiceAs
in interface ServiceManagementService
ownerUserId
- User who has ownershipserviceId
- Service IDprofile
- Service datainstance
- Service instance (Contents differ according to the type of service instance)attributes
- Service's extended attribute dataAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceAlreadyExistsException
- The specified service already existsServiceConfigurationException
- Process failed because service setup is invalidUnknownException
- Process failed@ValidatedMethod @AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN, argNames="serviceId") @TransactionMethod public void deleteService(@NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, ServiceNotInactiveException, UnknownException
ServiceManagementService
deleteService
in interface ServiceManagementService
serviceId
- ID of the deleted serviceAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundServiceNotInactiveException
- The specified service is not inactiveUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod @TransactionMethod public ServiceProfile getServiceProfile(@NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, UnknownException
ServiceManagementService
getServiceProfile
in interface ServiceManagementService
serviceId
- Service IDAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN, argNames="serviceId") @TransactionMethod public void setServiceProfile(@NotEmpty@ValidServiceId String serviceId, @NotNull ServiceProfile profile) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, UnknownException
ServiceManagementService
setServiceProfile
in interface ServiceManagementService
serviceId
- Service IDprofile
- Profile dataAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod @TransactionMethod public Attribute[] getServiceAttributes(@NotEmpty@ValidServiceId String serviceId, @NotNull@EachElement@ValidAttributeName String[] attributeNames) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, UnknownException
When an attribute name is specified that does not exist in attributeNames, that attribute name is ignored. When an empty string is set, gets all attributes which can be acquired.
getServiceAttributes
in interface ServiceManagementService
serviceId
- Service IDattributeNames
- Array of names of acquired attributesAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN, argNames="serviceId") @TransactionMethod public void setServiceAttributes(@NotEmpty@ValidServiceId String serviceId, @NotNull@EachElement@ValidAttribute Attribute[] attributes) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, UnknownException
When the specified attribute's value field is an empty string, that attribute is deleted.
setServiceAttributes
in interface ServiceManagementService
serviceId
- Service IDattributes
- Array of attributes to be setAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN, argNames="serviceId") @TransactionMethod public ServiceInstance getServiceInstance(@NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, UnknownException
ServiceManagementService
getServiceInstance
in interface ServiceManagementService
serviceId
- Service IDAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN, argNames="serviceId") @TransactionMethod public void setServiceInstance(@NotEmpty@ValidServiceId String serviceId, @NotNull ServiceInstance instance) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, ServiceNotInactiveException, UnknownException
When this API is called against an active service, throws ServiceNotInactiveException.
setServiceInstance
in interface ServiceManagementService
serviceId
- Service IDinstance
- Data relating to the instance of the serviceAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundServiceNotInactiveException
- The service is not inactiveUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod @TransactionMethod public byte[] getServiceWsdl(@NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, UnknownException
ServiceManagementService
getServiceWsdl
in interface ServiceManagementService
serviceId
- Service IDAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN, argNames="serviceId") @TransactionMethod public void activateService(@NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotActivatableException, ServiceNotFoundException, UnknownException
Doesn't do anything when the state is already active.
activateService
in interface ServiceManagementService
serviceId
- Service IDAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotActivatableException
- Service cannot be made activeServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod(policy=ADMINONLY) @TransactionMethod public void deactivateService(@NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotDeactivatableException, ServiceNotFoundException, UnknownException
Does nothing if already in an inactive state.
deactivateService
in interface ServiceManagementService
serviceId
- Service IDAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotDeactivatableException
- Service cannot be made inactiveServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod @TransactionMethod public boolean isServiceActive(@NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, UnknownException
ServiceManagementService
isServiceActive
in interface ServiceManagementService
serviceId
- Service IDAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod @TransactionMethod public Invocation[] getExternalInvocations(@NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, UnknownException
When called against a simple service always returns an empty result.
getExternalInvocations
in interface ServiceManagementService
serviceId
- Service IDAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN) @TransactionMethod public boolean isServiceVisible(@NotEmpty@ValidServiceId String serviceId) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, UnknownException
ServiceManagementService
isServiceVisible
in interface ServiceManagementService
serviceId
- Service IDAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause@ValidatedMethod @AccessRightValidatedMethod(policy=SERVICEOWNER_OR_ADMIN) @TransactionMethod public void setServiceVisible(@NotEmpty@ValidServiceId String serviceId, boolean visible) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, ServiceConfigurationException, ServiceNotFoundException, UnknownException
ServiceManagementService
setServiceVisible
in interface ServiceManagementService
serviceId
- Service IDvisible
- True when visibleAccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- An invalid parameter was passedNoAccessPermissionException
- The user executing the call lacks execution privilegesServiceConfigurationException
- Process failed because service setup is invalidServiceNotFoundException
- The specified service was not foundUnknownException
- Process failed due to an unknown cause