/** * Loads the endpoint descriptor for a given endpoint. * * @param endpointId the endpoint id * * @return the descriptor */ public EndpointDescriptor getEndpoint(String endpointId) { return this.remoteConfig.getEndpointDescriptor(endpointId); }
/** * Loads the endpoint descriptor for a given endpoint. * * @param endpointId the endpoint id * * @return the descriptor */ public EndpointDescriptor getEndpoint(String endpointId) { return this.remoteConfig.getEndpointDescriptor(endpointId); }
/** * Loads the endpoint descriptor for a given endpoint. * * @param endpointId the endpoint id * * @return the descriptor */ public static EndpointDescriptor getEndpoint(String endpointId) { return getRemoteConfiguration().getEndpointDescriptor(endpointId); }
/** * Loads the endpoint descriptor for a given endpoint. * * @param endpointId the endpoint id * * @return the descriptor */ public static EndpointDescriptor getEndpoint(String endpointId) { return getRemoteConfiguration().getEndpointDescriptor(endpointId); }
public Credentials retrieve(String endpointId) { Credentials credentials = this.credentialsMap.get(endpointId); if (credentials == null) { // Remap endpoint allow an endpoint to share another endpoint credentials // @see ConnectorService.getConnectorSession() EndpointDescriptor desc = this.remote.getEndpointDescriptor(endpointId); if (desc == null) { throw new IllegalArgumentException("Unknown endpoint ID: " + endpointId); } String remapId = desc.getParentId(); if (remapId != null) { credentials = this.credentialsMap.get(remapId); } } return credentials; }
public Credentials retrieve(String endpointId) { Credentials credentials = this.credentialsMap.get(endpointId); if (credentials == null) { // Remap endpoint allow an endpoint to share another endpoint credentials // @see ConnectorService.getConnectorSession() EndpointDescriptor desc = this.remote.getEndpointDescriptor(endpointId); if (desc == null) { throw new IllegalArgumentException("Unknown endpoint ID: " + endpointId); } String remapId = desc.getParentId(); if (remapId != null) { credentials = this.credentialsMap.get(remapId); } } return credentials; }
/** * Removes the ConnectorSession from the HttpSession for the given endpoint * * @param session the session * @param endpointId the endpoint id */ public void removeConnectorSession(HttpSession session, String endpointId) { if (session == null) { throw new IllegalArgumentException("HttpSession cannot be null."); } // Remap connector to use existing credential id connector session endpoint // to allow an endpoint to share another endpoint credentials and connector session // @see SimpleCredentialVault.retrieve() EndpointDescriptor desc = this.remoteConfig.getEndpointDescriptor(endpointId); if (desc.getParentId() != null) { endpointId = desc.getParentId(); } String key = getSessionEndpointKey(endpointId); session.removeAttribute(key); }
/** * Removes the ConnectorSession from the HttpSession for the given endpoint * * @param session the session * @param endpointId the endpoint id */ public void removeConnectorSession(HttpSession session, String endpointId) { if (session == null) { throw new IllegalArgumentException("HttpSession cannot be null."); } // Remap connector to use existing credential id connector session endpoint // to allow an endpoint to share another endpoint credentials and connector session // @see SimpleCredentialVault.retrieve() EndpointDescriptor desc = getRemoteConfig().getEndpointDescriptor(endpointId); if (desc.getParentId() != null) { endpointId = desc.getParentId(); } String key = getSessionEndpointKey(endpointId); session.removeAttribute(key); }
EndpointDescriptor desc = this.remoteConfig.getEndpointDescriptor(endpointId); if (desc.getParentId() != null)
public void store(Credentials credentials) { // check whether the given credentials should be flagged // as persistent String endpointId = credentials.getEndpointId(); EndpointDescriptor descriptor = getRemoteConfig().getEndpointDescriptor(endpointId); if(descriptor != null) { // mark the persistence attribute onto the credentials ((CredentialsImpl)credentials).persistent = descriptor.getPersistent(); } super.store(credentials); }
@ScriptMethod ( help="Checks if an endpoint is persistent or not", output="True if the endpoint is persistent" ) public boolean isEndpointPersistent(@ScriptParameter(help="Endpoint id") String id) { boolean persistent = false; RemoteConfigElement remoteConfig = getRemoteConfig(); if(remoteConfig != null) { EndpointDescriptor descriptor = remoteConfig.getEndpointDescriptor(id); if(descriptor != null) { persistent = descriptor.getPersistent(); } } return persistent; }
/** * Returns the description of an endpoint * * @param endpointId String * @return String */ @ScriptMethod ( help="Returns the description of an endpoint", output="Endpoint description" ) public String getEndpointDescription(@ScriptParameter(help="Endpoint id") String endpointId) { String description = null; RemoteConfigElement remoteConfig = getRemoteConfig(); if(remoteConfig != null) { EndpointDescriptor descriptor = remoteConfig.getEndpointDescriptor(endpointId); if(descriptor != null) { description = descriptor.getDescription(); } } return description; }
/** * Returns the description of an endpoint * * @param endpointId * @return */ @ScriptMethod ( help="Returns the description of an endpoint", output="Endpoint description" ) public String getEndpointDescription(@ScriptParameter(help="Endpoint id") String endpointId) { String description = null; RemoteConfigElement remoteConfig = getRemoteConfig(); if(remoteConfig != null) { EndpointDescriptor descriptor = remoteConfig.getEndpointDescriptor(endpointId); if(descriptor != null) { description = descriptor.getDescription(); } } return description; }
/** * Returns the configured URL for the given endpoint * * @param endpointId String * * @return the endpoint url */ @ScriptMethod ( help="Returns the configured URL for the given endpoint", output="The endpoint url" ) public String getEndpointURL(@ScriptParameter(help="Endpoint id") String endpointId) { String url = null; RemoteConfigElement remoteConfig = getRemoteConfig(); if (remoteConfig != null) { EndpointDescriptor descriptor = remoteConfig.getEndpointDescriptor(endpointId); if (descriptor != null) { url = descriptor.getEndpointUrl(); } } return url; }
/** * Returns the configured URL for the given endpoint * * @param endpointId String * * @return the endpoint url */ @ScriptMethod ( help="Returns the configured URL for the given endpoint", output="The endpoint url" ) public String getEndpointURL(@ScriptParameter(help="Endpoint id") String endpointId) { String url = null; RemoteConfigElement remoteConfig = getRemoteConfig(); if (remoteConfig != null) { EndpointDescriptor descriptor = remoteConfig.getEndpointDescriptor(endpointId); if (descriptor != null) { url = descriptor.getEndpointUrl(); } } return url; }
/** * Returns the description of an endpoint * * @param endpointId String * @return String */ @ScriptMethod ( help="Returns the description of an endpoint", output="Endpoint description" ) public String getEndpointDescription(@ScriptParameter(help="Endpoint id") String endpointId) { String description = null; RemoteConfigElement remoteConfig = getRemoteConfig(); if(remoteConfig != null) { EndpointDescriptor descriptor = remoteConfig.getEndpointDescriptor(endpointId); if(descriptor != null) { description = descriptor.getDescription(); } } return description; }
/** * Returns the name of an endpoint * * @param endpointId String * @return String */ @ScriptMethod ( help="Returns the name of an endpoint", output="Endpoint name" ) public String getEndpointName(@ScriptParameter(help="Endpoint id") String endpointId) { String name = null; RemoteConfigElement remoteConfig = getRemoteConfig(); if(remoteConfig != null) { EndpointDescriptor descriptor = remoteConfig.getEndpointDescriptor(endpointId); if(descriptor != null) { name = descriptor.getName(); } } return name; }
/** * Returns the name of an endpoint * * @param endpointId String * @return String */ @ScriptMethod ( help="Returns the name of an endpoint", output="Endpoint name" ) public String getEndpointName(@ScriptParameter(help="Endpoint id") String endpointId) { String name = null; RemoteConfigElement remoteConfig = getRemoteConfig(); if(remoteConfig != null) { EndpointDescriptor descriptor = remoteConfig.getEndpointDescriptor(endpointId); if(descriptor != null) { name = descriptor.getName(); } } return name; }
/** * Returns the configured URL for the given endpoint * * @param endpointId * * @return the endpoint url */ @ScriptMethod ( help="Returns the configured URL for the given endpoint", output="The endpoint url" ) public String getEndpointURL(@ScriptParameter(help="Endpoint id") String endpointId) { String url = null; RemoteConfigElement remoteConfig = getRemoteConfig(); if (remoteConfig != null) { EndpointDescriptor descriptor = remoteConfig.getEndpointDescriptor(endpointId); if (descriptor != null) { url = descriptor.getEndpointUrl(); } } return url; }
/** * Returns the name of an endpoint * * @param endpointId * @return */ @ScriptMethod ( help="Returns the name of an endpoint", output="Endpoint name" ) public String getEndpointName(@ScriptParameter(help="Endpoint id") String endpointId) { String name = null; RemoteConfigElement remoteConfig = getRemoteConfig(); if(remoteConfig != null) { EndpointDescriptor descriptor = remoteConfig.getEndpointDescriptor(endpointId); if(descriptor != null) { name = descriptor.getName(); } } return name; }