com.sap.portal.connectivity.destinations.impl

Class DestinationServiceImpl

java.lang.Object
  extended by com.sap.portal.connectivity.destinations.impl.DestinationServiceImpl
All Implemented Interfaces:
IDestinationsService

public class DestinationServiceImpl
extends Object
implements IDestinationsService

To retrieve an instance of this impl, use:


 IDestinationsService myService = com.sap.portal.connectivity.ServicesFactory.getDestinationService();
 


Field Summary
 
Fields inherited from interface com.sap.portal.connectivity.destinations.IDestinationsService
KEY, SERVICE_JNDI_NAME
 
Constructor Summary
DestinationServiceImpl()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DestinationServiceImpl

public DestinationServiceImpl()
Method Detail

getInstance

public static IDestinationsService getInstance()

getDestinationNames

public String[] getDestinationNames(com.sap.security.api.IUser user)
Description copied from interface: IDestinationsService
Returens list of destination names of all supported types

Specified by:
getDestinationNames in interface IDestinationsService
Parameters:
user - The user requesting the destinations list (some destinations source types require authentication to be get)
Returns:
returns an array of destination names

getDestinationNames

public String[] getDestinationNames(com.sap.security.api.IUser user,
                                    DestinationFilter[] destinationFilters)
Description copied from interface: IDestinationsService
Returens list of destination names matching given destination filters filters

Specified by:
getDestinationNames in interface IDestinationsService
Parameters:
user - 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)
Returns:
returns an array of destination names

getConnection

public IConnection getConnection(com.sap.security.api.IUser user,
                                 String destinationName,
                                 int enforceSource)
                          throws PortalDestinationsServiceException
Deprecated. 

Description copied from interface: IDestinationsService
Gets a connection to a back-end by its destination name and source type.

Specified by:
getConnection in interface IDestinationsService
Parameters:
user - User for retrieving the connection to
destinationName - name of the destination to get connection to
enforceSource - the source of the destination (since same destination name may exists on different sources)
Returns:
a connection to the back-end
Throws:
PortalDestinationsServiceException

getConnection

public IConnection getConnection(com.sap.security.api.IUser user,
                                 String destinationName,
                                 DestinationFilter destinationFilter)
                          throws PortalDestinationsServiceException
Description copied from interface: IDestinationsService
Gets a connection to a back-end by its destination name from matching the filter destination source and type.

Specified by:
getConnection in interface IDestinationsService
Parameters:
user - User for retrieving the connection to
destinationName - name of the destination to get connection to
destinationFilter - Enforce to match destination retriever of specific source and specific back end type
Returns:
a connection to the back-end
Throws:
PortalDestinationsServiceException

getConnection

public IConnection getConnection(com.sap.security.api.IUser user,
                                 String destinationName)
                          throws PortalDestinationsServiceException
Description copied from interface: IDestinationsService
Gets a connection to a back-end by its destination name.

Specified by:
getConnection in interface IDestinationsService
Parameters:
user - User for retrieving the connection to
destinationName - name of the destination to get connection to
Returns:
a connection to the back-end
Throws:
PortalDestinationsServiceException

getConnection

public IConnection getConnection(com.sap.security.api.IUser user,
                                 String destinationName,
                                 int enforceSource,
                                 String forcedUserName,
                                 String forcedPassword)
                          throws PortalDestinationsServiceException
Description copied from interface: IDestinationsService
Same as getConnection(IUser,String,String,String) with enforced source

Specified by:
getConnection in interface IDestinationsService
Parameters:
user - logged-on user to connect with
destinationName - the name of the destination to connect to
enforceSource - the source of the destination
forcedUserName - user name to connect with to the back-end
forcedPassword - password to connect with to the back-end
Returns:
IConnection to the back-end
Throws:
PortalDestinationsServiceException - when fail to get a connection (e.g. no such destination name in the source repository, rejection from the back-end etc)

getConnection

public IConnection getConnection(com.sap.security.api.IUser user,
                                 String destinationName,
                                 DestinationFilter destinationFilter,
                                 String forcedUserName,
                                 String forcedPassword)
                          throws PortalDestinationsServiceException
Description copied from interface: IDestinationsService
Same as getConnection(IUser,String,String,String) with enforced filter

Specified by:
getConnection in interface IDestinationsService
Parameters:
user - logged-on user to connect with
destinationName - the name of the destination to connect to
destinationFilter - filter for the source, type and SAP type
forcedUserName - user name to connect with to the back-end
forcedPassword - password to connect with to the back-end
Returns:
IConnection to the back-end
Throws:
PortalDestinationsServiceException - when fail to get a connection (e.g. no such destination name in the source repository, rejection from the back-end etc)

getConnection

public IConnection getConnection(com.sap.security.api.IUser user,
                                 String destinationName,
                                 DestinationFilter destinationFilter,
                                 Map<String,Object> overridingConnectionSpecProps)
                          throws PortalDestinationsServiceException
Description copied from interface: IDestinationsService
Gets Connector Framework connection to the back-end to a given destination name. The connection is established overriding the destination definition of any connection spec value available in the overridingConnectionSpecProps 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 IConnectionSpecMetaData

Specified by:
getConnection in interface IDestinationsService
Parameters:
user - logged-on user to connect with
destinationName - the name of the destination to connect to
destinationFilter - filter for the source, type and SAP type
overridingConnectionSpecProps - Map of connection spec keys and values to override back-end connection spec as stored in the destination definition
Returns:
IConnection to the back-end
Throws:
PortalDestinationsServiceException

getConnection

public IConnection getConnection(com.sap.security.api.IUser user,
                                 String destinationName,
                                 String forcedUserName,
                                 String forcedPassword)
                          throws PortalDestinationsServiceException
Description copied from interface: IDestinationsService
Gets Connector Framework connection to the back-end to a given destination name. The connection is established overriding the destination definition of credentials. e.g. destination is set to use SSO, or username/password are not defined in the destination, the method will use the given user name and password

Specified by:
getConnection in interface IDestinationsService
Parameters:
user - logged-on user to connect with
destinationName - the name of the destination to connect to
forcedUserName - user name to connect with to the back-end
forcedPassword - password to connect with to the back-end
Returns:
IConnection to the back-end
Throws:
PortalDestinationsServiceException - when fail to get a connection (e.g. no such destination name in the source repository, rejection from the back-end etc)

getConnection

public IConnection getConnection(com.sap.security.api.IUser user,
                                 String destinationName,
                                 Map<String,Object> overridingConnectionSpecProps)
                          throws PortalDestinationsServiceException
Description copied from interface: IDestinationsService
Gets Connector Framework connection to the back-end to a given destination name. The connection is established overriding the destination definition of any connection spec value available in the overridingConnectionSpecProps 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 IConnectionSpecMetaData

Specified by:
getConnection in interface IDestinationsService
Parameters:
user - logged-on user to connect with
destinationName - the name of the destination to connect to
overridingConnectionSpecProps - Map of connection spec keys and values to override back-end connection spec as stored in the destination definition
Returns:
IConnection to the back-end
Throws:
PortalDestinationsServiceException

getDestinationWrapper

public IDestinationWrapper getDestinationWrapper(com.sap.security.api.IUser user,
                                                 String destinationName)
                                          throws PortalDestinationsServiceException
Description copied from interface: IDestinationsService
Gets a destination wrapper by the destination name

Specified by:
getDestinationWrapper in interface IDestinationsService
destinationName - name of the destination
Returns:
a wrapper to the destinations, null if no destination is matching the given name
Throws:
PortalDestinationsServiceException

getDestinationWrapper

public IDestinationWrapper getDestinationWrapper(com.sap.security.api.IUser user,
                                                 String destinationName,
                                                 DestinationFilter destinationFilter)
                                          throws PortalDestinationsServiceException
Description copied from interface: IDestinationsService
Gets a destination wrapper by the destination name matching the given filter

Specified by:
getDestinationWrapper in interface IDestinationsService
destinationName - name of the destination
destinationFilter - filter for the source and type
Returns:
a wrapper to the destinations, null if no destination is matching the given name
Throws:
PortalDestinationsServiceException

registerDestinationSourceRetriever

public void registerDestinationSourceRetriever(AbstractDestinationsRetrieverSource retrieverSource)
Description copied from interface: IDestinationsService
Registers a destination retriever source

Specified by:
registerDestinationSourceRetriever in interface IDestinationsService
Parameters:
retrieverSource - the source to register

unregisterDestinationSourceRetriever

public void unregisterDestinationSourceRetriever(String key)
Description copied from interface: IDestinationsService
Unregisters a destination retriever source

Specified by:
unregisterDestinationSourceRetriever in interface IDestinationsService
Parameters:
key - the destination source key

getRegisteredDestinationSourcesKeys

public List<String> getRegisteredDestinationSourcesKeys()
Description copied from interface: IDestinationsService
Returns a list of registered destination source keys by the order they were registered

Specified by:
getRegisteredDestinationSourcesKeys in interface IDestinationsService
Returns:
list of String

getRegisteredDestinationSource

public AbstractDestinationsRetrieverSource getRegisteredDestinationSource(String key)
Description copied from interface: IDestinationsService
Returns a destination retriever source by its key

Specified by:
getRegisteredDestinationSource in interface IDestinationsService
Parameters:
key - the destination retriever key
Returns:
the destination retriever

getConnectionFactory

public IConnectionFactory getConnectionFactory(String jndiName)
Description copied from interface: IDestinationsService
Gets an instance of IConnectionFactory for a given JNDI name of Connector Framework implementing connector

Specified by:
getConnectionFactory in interface IDestinationsService
Parameters:
jndiName - JNDI name of the connector as its registered in the WebAS
Returns:
IConnectionFactory instance
Access Rights

This class can be accessed from:


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] tc/pp/smntcs/int/portalservicesapilibdeprecated api EP-VC-CON


Copyright 2015 SAP AG Complete Copyright Notice