public class DestinationServiceImpl extends Object implements IDestinationsService
IDestinationsService myService = com.sap.portal.connectivity.ServicesFactory.getDestinationService();
KEY, SERVICE_JNDI_NAME| Constructor and Description |
|---|
DestinationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
IConnection |
getConnection(com.sap.security.api.IUser user,
String destinationName)
Gets a connection to a back-end by its destination name.
|
IConnection |
getConnection(com.sap.security.api.IUser user,
String destinationName,
DestinationFilter destinationFilter)
Gets a connection to a back-end by its destination name from matching the filter destination source and type.
|
IConnection |
getConnection(com.sap.security.api.IUser user,
String destinationName,
DestinationFilter destinationFilter,
Map<String,Object> overridingConnectionSpecProps)
Gets Connector Framework connection to the back-end to a given destination name.
|
IConnection |
getConnection(com.sap.security.api.IUser user,
String destinationName,
DestinationFilter destinationFilter,
String forcedUserName,
String forcedPassword)
Same as
getConnection(IUser,String,String,String) with enforced filter |
IConnection |
getConnection(com.sap.security.api.IUser user,
String destinationName,
int enforceSource)
Deprecated.
|
IConnection |
getConnection(com.sap.security.api.IUser user,
String destinationName,
int enforceSource,
String forcedUserName,
String forcedPassword)
Same as
getConnection(IUser,String,String,String) with enforced source |
IConnection |
getConnection(com.sap.security.api.IUser user,
String destinationName,
Map<String,Object> overridingConnectionSpecProps)
Gets Connector Framework connection to the back-end to a given destination name.
|
IConnection |
getConnection(com.sap.security.api.IUser user,
String destinationName,
String forcedUserName,
String forcedPassword)
Gets Connector Framework connection to the back-end to a given destination name.
|
IConnectionFactory |
getConnectionFactory(String jndiName)
Gets an instance of
IConnectionFactory for a given JNDI name of
Connector Framework implementing connector |
String[] |
getDestinationNames(com.sap.security.api.IUser user)
Returens list of destination names of all supported types
|
String[] |
getDestinationNames(com.sap.security.api.IUser user,
DestinationFilter[] destinationFilters)
Returens list of destination names matching given destination filters
filters
|
IDestinationWrapper |
getDestinationWrapper(com.sap.security.api.IUser user,
String destinationName)
Gets a destination wrapper by the destination name
|
IDestinationWrapper |
getDestinationWrapper(com.sap.security.api.IUser user,
String destinationName,
DestinationFilter destinationFilter)
Gets a destination wrapper by the destination name matching the given filter
|
static IDestinationsService |
getInstance() |
AbstractDestinationsRetrieverSource |
getRegisteredDestinationSource(String key)
Returns a destination retriever source by its key
|
List<String> |
getRegisteredDestinationSourcesKeys()
Returns a list of registered destination source keys by the order they
were registered
|
void |
registerDestinationSourceRetriever(AbstractDestinationsRetrieverSource retrieverSource)
Registers a destination retriever source
|
void |
unregisterDestinationSourceRetriever(String key)
Unregisters a destination retriever source
|
public static IDestinationsService getInstance()
public String[] getDestinationNames(com.sap.security.api.IUser user)
IDestinationsServicegetDestinationNames in interface IDestinationsServiceuser - The user requesting the destinations list (some destinations source types require authentication to be get)public String[] getDestinationNames(com.sap.security.api.IUser user, DestinationFilter[] destinationFilters)
IDestinationsServicegetDestinationNames in interface IDestinationsServiceuser - The user requesting the destinations list (some destinations source types require authentication to be get)destinationFilters - filters array of destination source and type
e.g new DestinationFilter(IDestinationWrapper.SOURCE_PORTAL_SYSTEM_LANDSCAPE_SERVICE,
IDestinationWrapper.TYPE_SAP)public IConnection getConnection(com.sap.security.api.IUser user, String destinationName, int enforceSource) throws PortalDestinationsServiceException
IDestinationsServicegetConnection in interface IDestinationsServiceuser - User for retrieving the connection todestinationName - name of the destination to get connection toenforceSource - the source of the destination (since same destination
name may exists on different sources)PortalDestinationsServiceException - when fail to get a connectionpublic IConnection getConnection(com.sap.security.api.IUser user, String destinationName, DestinationFilter destinationFilter) throws PortalDestinationsServiceException
IDestinationsServicegetConnection in interface IDestinationsServiceuser - User for retrieving the connection todestinationName - name of the destination to get connection todestinationFilter - Enforce to match destination retriever of specific source and specific back end typePortalDestinationsServiceException - when fail to get a connectionpublic IConnection getConnection(com.sap.security.api.IUser user, String destinationName) throws PortalDestinationsServiceException
IDestinationsServicegetConnection in interface IDestinationsServiceuser - User for retrieving the connection todestinationName - name of the destination to get connection toPortalDestinationsServiceException - when fail to get a connectionpublic IConnection getConnection(com.sap.security.api.IUser user, String destinationName, int enforceSource, String forcedUserName, String forcedPassword) throws PortalDestinationsServiceException
IDestinationsServicegetConnection(IUser,String,String,String) with enforced sourcegetConnection in interface IDestinationsServiceuser - logged-on user to connect withdestinationName - the name of the destination to connect toenforceSource - the source of the destinationforcedUserName - user name to connect with to the back-endforcedPassword - password to connect with to the back-enIConnection to the back-endPortalDestinationsServiceException - when fail to get a connection
(e.g. no such destination name in the source repository, rejection from the
back-end etc)public IConnection getConnection(com.sap.security.api.IUser user, String destinationName, DestinationFilter destinationFilter, String forcedUserName, String forcedPassword) throws PortalDestinationsServiceException
IDestinationsServicegetConnection(IUser,String,String,String) with enforced filtergetConnection in interface IDestinationsServiceuser - logged-on user to connect withdestinationName - the name of the destination to connect todestinationFilter - filter for the source, type and SAP typeforcedUserName - user name to connect with to the back-endforcedPassword - password to connect with to the back-endIConnection to the back-endPortalDestinationsServiceException - when fail to get a connection
(e.g. no such destination name in the source repository, rejection from the
back-end etc)public IConnection getConnection(com.sap.security.api.IUser user, String destinationName, DestinationFilter destinationFilter, Map<String,Object> overridingConnectionSpecProps) throws PortalDestinationsServiceException
IDestinationsServiceoverridingConnectionSpecProps parameter. Clients
of this API should be familiar with the back-end connection spec, or, may discover the connection
spec using Connector Framework API via IConnectionSpecMetaDatagetConnection in interface IDestinationsServiceuser - logged-on user to connect withdestinationName - the name of the destination to connect todestinationFilter - filter for the source, type and SAP typeoverridingConnectionSpecProps - Map of connection spec keys and values to override back-end
connection spec as stored in the destination definitionIConnection to the back-endPortalDestinationsServiceException - when fail to get a connectionpublic IConnection getConnection(com.sap.security.api.IUser user, String destinationName, String forcedUserName, String forcedPassword) throws PortalDestinationsServiceException
IDestinationsServicegetConnection in interface IDestinationsServiceuser - logged-on user to connect withdestinationName - the name of the destination to connect toforcedUserName - user name to connect with to the back-endforcedPassword - password to connect with to the back-endIConnection to the back-endPortalDestinationsServiceException - when fail to get a connection
(e.g. no such destination name in the source repository, rejection from the
back-end etc)public IConnection getConnection(com.sap.security.api.IUser user, String destinationName, Map<String,Object> overridingConnectionSpecProps) throws PortalDestinationsServiceException
IDestinationsServiceoverridingConnectionSpecProps parameter. Clients
of this API should be familiar with the back-end connection spec, or, may discover the connection
spec using Connector Framework API via IConnectionSpecMetaDatagetConnection in interface IDestinationsServiceuser - logged-on user to connect withdestinationName - the name of the destination to connect tooverridingConnectionSpecProps - Map of connection spec keys and values to override back-end
connection spec as stored in the destination definitionIConnection to the back-endPortalDestinationsServiceException - when fail to get a connectionpublic IDestinationWrapper getDestinationWrapper(com.sap.security.api.IUser user, String destinationName) throws PortalDestinationsServiceException
IDestinationsServicegetDestinationWrapper in interface IDestinationsServiceuser - is a user objectdestinationName - name of the destinationnull if noPortalDestinationsServiceException - when fail to get a connection
destination is matching the given namepublic IDestinationWrapper getDestinationWrapper(com.sap.security.api.IUser user, String destinationName, DestinationFilter destinationFilter) throws PortalDestinationsServiceException
IDestinationsServicegetDestinationWrapper in interface IDestinationsServiceuser - is a user objectdestinationName - name of the destinationdestinationFilter - filter for the source and typenull if noPortalDestinationsServiceException - when fail to get a connection
destination is matching the given namepublic void registerDestinationSourceRetriever(AbstractDestinationsRetrieverSource retrieverSource)
IDestinationsServiceregisterDestinationSourceRetriever in interface IDestinationsServiceretrieverSource - the source to registerpublic void unregisterDestinationSourceRetriever(String key)
IDestinationsServiceunregisterDestinationSourceRetriever in interface IDestinationsServicekey - the destination source keypublic List<String> getRegisteredDestinationSourcesKeys()
IDestinationsServicegetRegisteredDestinationSourcesKeys in interface IDestinationsServiceStringpublic AbstractDestinationsRetrieverSource getRegisteredDestinationSource(String key)
IDestinationsServicegetRegisteredDestinationSource in interface IDestinationsServicekey - the destination retriever keypublic IConnectionFactory getConnectionFactory(String jndiName)
IDestinationsServiceIConnectionFactory for a given JNDI name of
Connector Framework implementing connectorgetConnectionFactory in interface IDestinationsServicejndiName - JNDI name of the connector as its registered in the WebASIConnectionFactory instance| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-CONNECTIVITY
|
[sap.com] tc/ep/connectivity/api
|
api
|
EP-VC-CON
|
[sap.com] EP-CONNECTIVITY
|
[sap.com] tc/ep/connectivity/lib/api
|
api
|
EP-VC-CON
|
[sap.com] EP-CONNECTIVITY
|
[sap.com]
|
api
|
EP-VC-CON
|
Copyright 2021 SAP SE Complete Copyright Notice