Package com.avoka.fc.core.dao
Class ServiceDefinitionDao
java.lang.Object
com.avoka.core.dao.BaseDao
com.avoka.fc.core.dao.AbstractDao
com.avoka.fc.core.dao.ServiceDefinitionDao
Provides a DAO for the ServiceDefinition entity.
- See Also:
-
Field Summary
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canCreateService
(Client targetClient, String name) Check whether a service with the specified client and name can be created without conflict.boolean
doesServiceNameExistForOtherServiceTypes
(String serviceName, String serviceType) Find out whether a given service name is used in service types other than the specified one.generateUniqueServiceName
(Client client, String serviceName) Generates a unique (to the specified client) service name based on a suggested service name.generateUniqueServiceName
(String serviceName) Deprecated.use generateUniqueServiceName(Long, String) insteadReturn the full list of active service definitions, ordered by name and version numberReturn the full list of service types, consisting of the hard-coded core service types and any project-specific types occurring in the db-config filesReturn an ordered set of available global core service types.Return an ordered set of available service types.getClientService
(Long clientId, String serviceName) Return the current version service for the given client, service name, or null if none was found.getClientService
(Long clientId, String serviceName, Integer versionNumber) Deprecated.getClientService
(Long clientId, String serviceName, String version) Return the service for the given client, service name and version, or null if none was found.getClientServiceWithFallback
(Client client, String serviceName) Return the current version service for the given client, service name, or null if none was found.getClientServiceWithFallback
(Client client, String serviceName, Integer versionNumber) Deprecated.getClientServiceWithFallback
(Client client, String serviceName, String version) Return the service for the given client, service name and version number, or null if none was found.Return the list of default service definitionsgetFluentFunctionService
(String clientId, String keyword, String type, String applicationPackageId, boolean clientOnly, boolean activeOnly) Return the list of fluent function service definitions matching the specified search criteria, ordered by service type and name.getFormServiceDefinitionList
(String clientId, String keyword, String type, String applicationPackageId, boolean groovyServiceOnly, boolean activeOnly) Return the list of form service definitions matching the specified search criteria, ordered by service type and namegetFormServiceDefinitionList
(String clientId, String keyword, String type, String applicationPackageId, boolean groovyServiceOnly, boolean clientOnly, boolean activeOnly) Return the list of form service definitions matching the specified search criteria, ordered by service type and namegetGlobalCoreServiceDefinitionList
(String keyword, String type, boolean groovyServiceOnly, boolean activeOnly) Return the list of core service definitions matching the specified search criteria, ordered by service type and namegetJobsServiceDefinitionList
(String clientId, String keyword, String type, String applicationPackageId, boolean activeOnly, boolean userIsFormDeveloper) Return the list of job related service definitions matching the specified search criteria, ordered by service type and namegetJobsServiceDefinitionList
(String clientId, String keyword, String type, String appPackageId, boolean groovyServicesOnly, boolean activeOnly, boolean userIsFormDeveloper) Return the list of job related service definitions matching the specified search criteria, ordered by service type and namegetJobsServiceDefinitionList
(String clientId, String keyword, String type, String appPackageId, boolean groovyServicesOnly, boolean clientOnly, boolean activeOnly, boolean userIsFormDeveloper) Return the list of job related service definitions matching the specified search criteria, ordered by service type and namegetOptionalServiceDefinitionForName
(String serviceName) Deprecated.usegetClientService(Long, String, Integer)
orinvalid reference
ServiceDefinitionDao#getClientServiceWithFallback(Long, String, Integer)
getScheduledServicesByName
(String serviceName) Return the list of scheduled services and test suites (current version only) with the given name.getServiceDefinitionDefaultForType
(String serviceType) Return the default service definition for the given service typegetServiceDefinitionForName
(String serviceName) Deprecated.use getClientService(Long, String, Integer) insteadReturn the service definition with the specified OIDReturn the full list of service definitions, ordered by type, then namegetServiceDefinitionList
(String keyword, String type, boolean activeOnly, boolean userIsFormDeveloper) Deprecated.getServiceDefinitionList
(String clientId, String keyword, String type, String applicationPackageId, boolean activeOnly, boolean userIsFormDeveloper) Return the list of service definitions matching the specified search criteria, ordered by service type and namegetServiceDefinitionList
(String clientId, String keyword, String type, String applicationPackageId, boolean groovyServiceOnly, boolean activeOnly, boolean userIsFormDeveloper) Return the list of service definitions matching the specified search criteria, ordered by service type and namegetServiceDefinitionList
(String clientId, String keyword, String type, String applicationPackageId, boolean groovyServiceOnly, boolean clientOnly, boolean activeOnly, boolean userIsFormDeveloper) Return the list of service definitions matching the specified search criteria, ordered by service type and namegetServiceDefinitionListForApplication
(String applicationId) Return the service definition for the given application packageReturn the list of service definitions for a client, ordered by type, then namegetServiceDefinitionListForClient
(Client client, boolean activeServicesOnly) Return the list of service definitions for a client, ordered by type, then name and version numbergetServiceDefinitionListForType
(String type, boolean includeInactiveServices) Return the service definitions for the given type, sorted by type and namegetServiceDefinitionListForType
(String type, Client client, boolean includeInactiveServices) Return the service definitions for the given type, sorted by type and name.getServiceDefinitionListForUserAndType
(String type, UserAccount userAccount, boolean includeInactiveServices) Return the service definitions for the given type, and filtered based on user account accessgetServiceForNameAndVersion
(String serviceName, Integer versionNumber) Deprecated.use getServiceForClientNameAndVersion insteadgetServiceListIds
(List<Long> serviceIds, UserAccount userAccount) Return the list of services for the given service IDs filtered for the users access.getServiceVersionsForName
(Long clientId, String serviceName) Return all service definitions with the given client and name (but different version numbers)getServiceVersionsForName
(String serviceName) Deprecated.use getServiceVersionsForName(Long, String) insteadgetServiceWithHighestVersionNumber
(Long clientId, String serviceName) Return the active service with the highest version number for a specific client and service name.getServiceWithHighestVersionNumber
(Long clientId, String serviceName, boolean activeServicesOnly) Return the service with the highest version number for a specific client and service name.getServiceWithHighestVersionNumber
(String serviceName) Deprecated.use getServiceWithHighestVersionNumber(Long, String) insteadReturn the list of Test Suite service definitions.Return getTrashCanDeliveryProcessServicegetUnitTestServices
(String clientId, boolean userIsFormDeveloper) Return the list of service definitions with unit testing enabled.boolean
hasDefaultServiceDefinitionForType
(String serviceType) Return whether there is a default service definition for the given typeboolean
hasServiceDefinition
(Client client, String serviceName) Return whether there is at least one service definition with the given name Note: This method does not fall back to a global service if a clientId is specified.boolean
hasServiceDefinitionForName
(String serviceName) Deprecated.usehasServiceDefinition(Client, String)
insteadparseCompositeNameVersionString
(String compositeString) Return the service name and version number components parsed from a composite string in the format "name|version" If the string is not in a suitable format, it is assumed that it merely contains the service name, not the version number.void
Set a specified service definition to be the default of its service type, unsetting the default flag from all other service definitions of the same typevoid
Set a specified service definition to be the default of its service type, unsetting the default flag from all other service definitions of the same typeMethods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
Constructor Details
-
ServiceDefinitionDao
public ServiceDefinitionDao()
-
-
Method Details
-
getServiceDefinitionForPK
Return the service definition with the specified OID- Parameters:
id
- the OID- Returns:
- the matching service definition, or null if not found
-
getServiceDefinitionList
Return the full list of service definitions, ordered by type, then name- Returns:
- the list of service definitions
-
getActiveServiceDefinitionList
Return the full list of active service definitions, ordered by name and version number- Returns:
- the list of active service definitions
-
getServiceDefinitionListForClient
Return the list of service definitions for a client, ordered by type, then name- Parameters:
client
- the client (optional)- Returns:
- the list of service definitions
-
getServiceDefinitionListForClient
public List<ServiceDefinition> getServiceDefinitionListForClient(Client client, boolean activeServicesOnly) Return the list of service definitions for a client, ordered by type, then name and version number- Parameters:
client
- the client (optional)activeServicesOnly
- whether to return only services with the active flag set- Returns:
- the list of service definitions
- Since:
- 4.0.0
-
getServiceDefinitionForName
@Deprecated public ServiceDefinition getServiceDefinitionForName(String serviceName) throws ApplicationException Deprecated.use getClientService(Long, String, Integer) insteadReturn the service definition for the given service name- Parameters:
serviceName
- the non-null service name- Returns:
- the matching service definition
- Throws:
ApplicationException
- if no service definition with this name exists
-
getServiceForNameAndVersion
@Deprecated public ServiceDefinition getServiceForNameAndVersion(String serviceName, Integer versionNumber) Deprecated.use getServiceForClientNameAndVersion insteadReturn the service with the given name and version number, or null if none was found.- Parameters:
serviceName
- the full service name (required)versionNumber
- the version number (optional; if null, this method will retrieve the current version)- Returns:
- the matching service, or null if none was found
- Since:
- 4.3.0
-
getClientServiceWithFallback
@Deprecated public ServiceDefinition getClientServiceWithFallback(Client client, String serviceName, Integer versionNumber) Deprecated.Return the service for the given client, service name and version number, or null if none was found. If no client is passed in, only global services will be considered. If a client is passed in, the client is searched for a matching service; if none is found but a matching global service exists, the global service is returned. If you do not want to fall back to the global service, use getClientService(Long, Integer) instead.- Parameters:
client
- the client the service belongs to (optional; see above)serviceName
- the full service name (required)versionNumber
- the version number (optional; if null, this method will retrieve the current version)- Returns:
- the matching service, or null if none was found
- Since:
- 5.0.0
-
getClientServiceWithFallback
Return the current version service for the given client, service name, or null if none was found. If no client is passed in, only global services will be considered. If a client is passed in, the client is searched for a matching service; if none is found but a matching global service exists, the global service is returned. If you do not want to fall back to the global service, use getClientService(Long, Integer) instead.- Parameters:
client
- the client the service belongs to (optional; see above)serviceName
- the full service name (required)- Returns:
- the matching service, or null if none was found
- Since:
- 17.10.0
-
getClientServiceWithFallback
public ServiceDefinition getClientServiceWithFallback(Client client, String serviceName, String version) Return the service for the given client, service name and version number, or null if none was found. If no client is passed in, only global services will be considered. If a client is passed in, the client is searched for a matching service; if none is found but a matching global service exists, the global service is returned. If you do not want to fall back to the global service, use getClientService(Long, Integer) instead.- Parameters:
client
- the client the service belongs to (optional; see above)serviceName
- the full service name (required)version
- the version (optional; if null, this method will retrieve the current version)- Returns:
- the matching service, or null if none was found
- Since:
- 17.10.0
-
getClientService
@Deprecated public ServiceDefinition getClientService(Long clientId, String serviceName, Integer versionNumber) Deprecated.Return the service for the given client, service name and version number, or null if none was found. Note: This method does NOT fall back to global services. Use getServiceForClientNameAndVersion if you need that.- Parameters:
clientId
- the OID of the client the service belongs to (optional; if not set, only global services will be considered)serviceName
- the full service name (required)versionNumber
- the version number (optional; if null, this method will retrieve the current version)- Returns:
- the matching client/global service, or null if none was found
- Since:
- 5.0.0
-
getClientService
Return the current version service for the given client, service name, or null if none was found. Note: This method does NOT fall back to global services. Use getServiceForClientNameAndVersion if you need that.- Parameters:
clientId
- the OID of the client the service belongs to (optional; if not set, only global services will be considered)serviceName
- the full service name (required)- Returns:
- the matching client/global service, or null if none was found
- Since:
- 17.10.0
-
getClientService
Return the service for the given client, service name and version, or null if none was found. Note: This method does NOT fall back to global services. Use getServiceForClientNameAndVersion if you need that.- Parameters:
clientId
- the OID of the client the service belongs to (optional; if not set, only global services will be considered)serviceName
- the full service name (required)version
- the version (optional; if null, this method will retrieve the current version)- Returns:
- the matching client/global service, or null if none was found
- Since:
- 17.10.0
-
getServiceVersionsForName
Return all service definitions with the given client and name (but different version numbers)- Parameters:
clientId
- the OID of the client (optional; if not set, only global services will be considered)serviceName
- the service name (required)- Returns:
- the list of service definitions ordered ascending by version number
- Since:
- 5.0.0
-
getServiceVersionsForName
Deprecated.use getServiceVersionsForName(Long, String) insteadReturn all service definitions with the given name (but different version numbers)- Parameters:
serviceName
- the service name (required)- Returns:
- the list of service definitions ordered ascending by version number
- Since:
- 4.3.0
-
getServiceDefinitionListForApplication
Return the service definition for the given application package- Parameters:
applicationId
- the OID of the application package (required)- Returns:
- the list of matching service definitions
- Since:
- 4.0.0
-
getOptionalServiceDefinitionForName
Deprecated.usegetClientService(Long, String, Integer)
orinvalid reference
ServiceDefinitionDao#getClientServiceWithFallback(Long, String, Integer)
Return the service definition for the given service name that is marked as the current version.- Parameters:
serviceName
- the non-null service name- Returns:
- the matching service definition, or null if no such service exists
-
getServiceDefinitionDefaultForType
public ServiceDefinition getServiceDefinitionDefaultForType(String serviceType) throws ApplicationException Return the default service definition for the given service type- Parameters:
serviceType
- the service type- Returns:
- the default service definition for the given type
- Throws:
ApplicationException
- if no or multiple default services were found
-
getDefaultServiceDefinitionList
Return the list of default service definitions- Returns:
- the default service definition list
-
hasDefaultServiceDefinitionForType
Return whether there is a default service definition for the given type- Parameters:
serviceType
- the non-null service type- Returns:
- true if there is a default service definition
-
hasServiceDefinitionForName
Deprecated.usehasServiceDefinition(Client, String)
insteadReturn whether there is at least one service definition with the given name Note: Since 4.3.0, the name is no longer guaranteed to be unique (instead the combination of name + version number is unique).- Parameters:
serviceName
- the non-null name- Returns:
- true if there is a service definition with the given name
-
hasServiceDefinition
Return whether there is at least one service definition with the given name Note: This method does not fall back to a global service if a clientId is specified.- Parameters:
client
- the client (optional; if not set, only global services are considered)serviceName
- the non-null name- Returns:
- true if there is a service definition with the given name
- Since:
- 5.0.0
-
canCreateService
Check whether a service with the specified client and name can be created without conflict. Conflicts occur when a service with the same name already exists on the global level (if targetClient was specified) or for any client (if targetClient was null) If this method returns false, this means that the specified name/client combination is not valid and cannot be used for a service. NOTE: This method does not check if a service with the specified name and client already exists. It only checks is such a service is theoretically possible.- Parameters:
targetClient
- the client with which the new service will be associated (optional; leave it null to denote a global service)name
- the desired service name (required)- Returns:
- true if such a service can be created, false if a conflict was found
- Since:
- 5.0.0
-
getServiceDefinitionList
@Deprecated public Iterable<ServiceDefinition> getServiceDefinitionList(String keyword, String type, boolean activeOnly, boolean userIsFormDeveloper) Deprecated.Deprecated. Useinvalid reference
ServiceDefinitionDao#getServiceDefinitionList(Object, String, String, String, boolean, boolean)
- Parameters:
keyword
- the search keywordtype
- a substring of the service type (optional)activeOnly
- the flag to only include active service definitionsuserIsFormDeveloper
- indicates that the user is a form developer and does not have access to all service types- Returns:
- the list of matching service definitions
-
getServiceDefinitionList
public List<ServiceDefinition> getServiceDefinitionList(String clientId, String keyword, String type, String applicationPackageId, boolean activeOnly, boolean userIsFormDeveloper) Return the list of service definitions matching the specified search criteria, ordered by service type and name- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the search keywordtype
- a substring of the service type (optional)applicationPackageId
- the ID of an application package associated with the service (optional)activeOnly
- the flag to only include active service definitionsuserIsFormDeveloper
- indicates that the user is a form developer and does not have access to all service types- Returns:
- the list of matching service definitions
- Since:
- 3.6.0
-
getServiceDefinitionList
public List<ServiceDefinition> getServiceDefinitionList(String clientId, String keyword, String type, String applicationPackageId, boolean groovyServiceOnly, boolean activeOnly, boolean userIsFormDeveloper) Return the list of service definitions matching the specified search criteria, ordered by service type and name- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the search keywordtype
- a substring of the service type (optional)applicationPackageId
- the ID of an application package associated with the service (optional)groovyServiceOnly
- the flag to only includes services with a Groovy script parameteractiveOnly
- the flag to only include active service definitionsuserIsFormDeveloper
- indicates that the user is a form developer and does not have access to all service types- Returns:
- the list of matching service definitions
- Since:
- 4.3.0
-
getTrashCanDeliveryProcessService
Return getTrashCanDeliveryProcessService- Returns:
- ServiceDefinition of Trash Can Delivery Process service
- Since:
- 23.10.0
-
getServiceDefinitionList
public List<ServiceDefinition> getServiceDefinitionList(String clientId, String keyword, String type, String applicationPackageId, boolean groovyServiceOnly, boolean clientOnly, boolean activeOnly, boolean userIsFormDeveloper) Return the list of service definitions matching the specified search criteria, ordered by service type and name- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the search keywordtype
- a substring of the service type (optional)applicationPackageId
- the ID of an application package associated with the service (optional)groovyServiceOnly
- the flag to only includes services with a Groovy script parameterclientOnly
- the flag to show only client scope services.activeOnly
- the flag to only include active service definitionsuserIsFormDeveloper
- indicates that the user is a form developer and does not have access to all service types- Returns:
- the list of matching service definitions
- Since:
- 5.1.0
-
getGlobalCoreServiceDefinitionList
public List<ServiceDefinition> getGlobalCoreServiceDefinitionList(String keyword, String type, boolean groovyServiceOnly, boolean activeOnly) Return the list of core service definitions matching the specified search criteria, ordered by service type and name- Parameters:
keyword
- the search keywordtype
- a substring of the service type (optional)groovyServiceOnly
- the flag to only includes services with a Groovy script parameteractiveOnly
- the flag to only include active service definitions- Returns:
- the list of matching service definitions
- Since:
- 5.0.0
-
getFormServiceDefinitionList
public List<ServiceDefinition> getFormServiceDefinitionList(String clientId, String keyword, String type, String applicationPackageId, boolean groovyServiceOnly, boolean activeOnly) Return the list of form service definitions matching the specified search criteria, ordered by service type and name- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the search keywordtype
- a substring of the service type (optional)applicationPackageId
- the ID of an application package associated with the service (optional)groovyServiceOnly
- the flag to only includes services with a Groovy script parameteractiveOnly
- the flag to only include active service definitions- Returns:
- the list of matching service definitions
- Since:
- 4.3.1
-
getFluentFunctionService
public List<ServiceDefinition> getFluentFunctionService(String clientId, String keyword, String type, String applicationPackageId, boolean clientOnly, boolean activeOnly) Return the list of fluent function service definitions matching the specified search criteria, ordered by service type and name.- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the search keywordtype
- a substring of the service type (optional)applicationPackageId
- the ID of an application package associated with the service (optional)clientOnly
- the flag to only include client servicesactiveOnly
- the flag to only include active service definitions- Returns:
- the list of matching service definitions
- Since:
- 17.10.0
-
getFormServiceDefinitionList
public List<ServiceDefinition> getFormServiceDefinitionList(String clientId, String keyword, String type, String applicationPackageId, boolean groovyServiceOnly, boolean clientOnly, boolean activeOnly) Return the list of form service definitions matching the specified search criteria, ordered by service type and name- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the search keywordtype
- a substring of the service type (optional)applicationPackageId
- the ID of an application package associated with the service (optional)groovyServiceOnly
- the flag to only includes services with a Groovy script parameterclientOnly
- the flag to only include client servicesactiveOnly
- the flag to only include active service definitions- Returns:
- the list of matching service definitions
- Since:
- 5.1.0
-
getUnitTestServices
Return the list of service definitions with unit testing enabled.- Parameters:
clientId
- the client iduserIsFormDeveloper
- is user a form developer- Returns:
- the list of service definitions with unit testing enabled
- Since:
- 4.3.0
-
getTestSuiteServices
Return the list of Test Suite service definitions.- Returns:
- the list of Test Suite service definitions.
- Since:
- 4.3.0
-
getJobsServiceDefinitionList
public List<ServiceDefinition> getJobsServiceDefinitionList(String clientId, String keyword, String type, String applicationPackageId, boolean activeOnly, boolean userIsFormDeveloper) Return the list of job related service definitions matching the specified search criteria, ordered by service type and name- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the search keywordtype
- a substring of the service type (optional)applicationPackageId
- the ID of an application package associated with the service (optional)activeOnly
- the flag to only include active service definitionsuserIsFormDeveloper
- indicates that the user is a form developer and does not have access to all service types- Returns:
- the list of matching service definitions
- Since:
- 4.1.0
-
getJobsServiceDefinitionList
public List<ServiceDefinition> getJobsServiceDefinitionList(String clientId, String keyword, String type, String appPackageId, boolean groovyServicesOnly, boolean activeOnly, boolean userIsFormDeveloper) Return the list of job related service definitions matching the specified search criteria, ordered by service type and name- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the search keywordtype
- a substring of the service type (optional)appPackageId
- the ID of an application package associated with the service (optional)groovyServicesOnly
- the flag to only include Groovy script based servicesactiveOnly
- the flag to only include active service definitionsuserIsFormDeveloper
- indicates that the user is a form developer and does not have access to all service types- Returns:
- the list of matching service definitions
- Since:
- 4.3.0
-
getJobsServiceDefinitionList
public List<ServiceDefinition> getJobsServiceDefinitionList(String clientId, String keyword, String type, String appPackageId, boolean groovyServicesOnly, boolean clientOnly, boolean activeOnly, boolean userIsFormDeveloper) Return the list of job related service definitions matching the specified search criteria, ordered by service type and name- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the search keywordtype
- a substring of the service type (optional)appPackageId
- the ID of an application package associated with the service (optional)groovyServicesOnly
- the flag to only include Groovy script based servicesclientOnly
- the flag to specify show only client servicesactiveOnly
- the flag to only include active service definitionsuserIsFormDeveloper
- indicates that the user is a form developer and does not have access to all service types- Returns:
- the list of matching service definitions
- Since:
- 5.1.0
-
getServiceDefinitionListForType
public List<ServiceDefinition> getServiceDefinitionListForType(String type, boolean includeInactiveServices) Return the service definitions for the given type, sorted by type and name- Parameters:
type
- the service type (optional)includeInactiveServices
- whether to include inactive services in the list of results- Returns:
- the list of matching service definitions
-
getServiceDefinitionListForType
public List<ServiceDefinition> getServiceDefinitionListForType(String type, Client client, boolean includeInactiveServices) Return the service definitions for the given type, sorted by type and name. If a client is specified, services belonging to other clients are excluded from the result.- Parameters:
type
- the service type (optional)client
- if set, only global services and those belonging to the client will be returned - services belonging to other clients are excludedincludeInactiveServices
- whether to include inactive services in the list of results- Returns:
- the list of matching service definitions
-
getServiceDefinitionListForUserAndType
public List<ServiceDefinition> getServiceDefinitionListForUserAndType(String type, UserAccount userAccount, boolean includeInactiveServices) Return the service definitions for the given type, and filtered based on user account access- Parameters:
type
- the service type (optional)userAccount
- user account parameterincludeInactiveServices
- whether to include inactive services in the list of results- Returns:
- the list of matching service definitions
- Since:
- 18.11.4
-
setCurrentVersion
Set a specified service definition to be the default of its service type, unsetting the default flag from all other service definitions of the same type- Parameters:
sd
- the non-null service definition- Since:
- 4.3.0
-
setDefaultType
Set a specified service definition to be the default of its service type, unsetting the default flag from all other service definitions of the same type- Parameters:
sd
- the non-null service definition
-
getAllServiceTypes
Return the full list of service types, consisting of the hard-coded core service types and any project-specific types occurring in the db-config files- Returns:
- a list of service types, sorted ascending and case-insensitive
-
getAvailableServiceTypes
Return an ordered set of available service types.- Returns:
- an ordered set of available service types
- Since:
- 4.3.0
-
getAvailableGlobalCoreServiceTypes
Return an ordered set of available global core service types.- Returns:
- an ordered set of available global core service types
- Since:
- 5.0.0
-
generateUniqueServiceName
Deprecated.use generateUniqueServiceName(Long, String) insteadGenerates a globally unique service name based on a suggested service name.- Parameters:
serviceName
- the suggested service name- Returns:
- a globally unique service name that does not equal any of the service names existing in the database
- Since:
- 3.6.0
-
generateUniqueServiceName
Generates a unique (to the specified client) service name based on a suggested service name.- Parameters:
client
- the client (optional; if not set, only global services will be considered)serviceName
- the suggested service name- Returns:
- a service name that does not equal any of the service names existing for the client (or if no client was passed in, a service name that does not match the name of any other global service)
- Since:
- 5.0.0
-
doesServiceNameExistForOtherServiceTypes
Find out whether a given service name is used in service types other than the specified one. This is used during service creation to avoid multiple services with the same name but different service types.- Parameters:
serviceName
- the service name to search for (required)serviceType
- the service type to exclude (required)- Returns:
- true if a service with the same name exists for different service types
- Since:
- 4.3.0
-
getServiceWithHighestVersionNumber
Return the active service with the highest version number for a specific client and service name.- Parameters:
clientId
- the OID of the client (optional; if not set, only global services will be considered)serviceName
- the service name (required)- Returns:
- the service definition with the given name that has the highest version number, or null if none was found
- Since:
- 5.0.0
-
getServiceWithHighestVersionNumber
public ServiceDefinition getServiceWithHighestVersionNumber(Long clientId, String serviceName, boolean activeServicesOnly) Return the service with the highest version number for a specific client and service name.- Parameters:
clientId
- the OID of the client (optional; if not set, only global services will be considered)serviceName
- the service name (required)activeServicesOnly
- whether to limit the search to active services, or include active and inactive services- Returns:
- the service definition with the given name that has the highest version number, or null if none was found
- Since:
- 19.11.0
-
getServiceWithHighestVersionNumber
Deprecated.use getServiceWithHighestVersionNumber(Long, String) insteadReturn the service with the highest version number for a specific service name.- Parameters:
serviceName
- the service name (required)- Returns:
- the service definition with the given name that has the highest version number, or null if none was found
- Since:
- 4.3.0
-
parseCompositeNameVersionString
Return the service name and version number components parsed from a composite string in the format "name|version" If the string is not in a suitable format, it is assumed that it merely contains the service name, not the version number. Examples:"My Service|1" -> invalid input: '<'"My Service", 1> "Test|Prod Service|2" -> invalid input: '<'"Test|Prod Service", 2> "Test|Prod Service" -> invalid input: '<'"Test|Prod Service", null> "Forms Render Receipt" -> invalid input: '<'"Forms Render Receipt", null>
- Parameters:
compositeString
- the composite string that may contain a version number along with the service name (required)- Returns:
- A pair of the service name and the version number. If no specific version number could be parsed, null will be returned. TM will generally used the version marked as the current version for such requests.
- Since:
- 4.3.0
-
getScheduledServicesByName
Return the list of scheduled services and test suites (current version only) with the given name. Because no client is specified, there may be several matching services. This method is used for backward compatibility support in scheduled service resolution. Note: This method is for internal use only and may change without notice. Do not use.- Parameters:
serviceName
- the service name (required)- Returns:
- the list of matching service definitions
- Since:
- 5.0.0
-
getServiceListIds
Return the list of services for the given service IDs filtered for the users access.- Parameters:
serviceIds
- the list of service IDs (required)userAccount
- the logged in user account (required)- Returns:
- the list of services for the given service IDs
- Since:
- 5.0.0
-