All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.mfp.adapter.api.ConfigurationAPI Maven / Gradle / Ivy

Go to download

IBM MFP Adapter api for adapter as a maven project. BuildNumber is : 8.0.2024082809

The newest version!
/*
* © Copyright IBM Corp. 2016
* All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/

package com.ibm.mfp.adapter.api;

import com.ibm.json.java.JSONObject;

/**
 * API to get values of configuration properties during runtime (both worklight.properties and JNDI properties)
 *
 */


/**
 * API to get values of configuration properties during runtime.
 * This API is accessible using the Jax-RS {@literal@}Context annotation, for example by defining a member varaible:
 * 
 
 {@literal@}Context
 private ConfigurationAPI configurationApi;
 }
 
 
* */ public interface ConfigurationAPI { /** * Helper method to retrieve JNDI properties from the server configuration. * * @param name - The property's name * @return The value of the property or null if the property is not defined */ String getServerJNDIProperty(String name); /** * Gets the property value for the given property name. This method will return * the value from the adapter configuration, if it was defined. Otherwise the default * value (defined in the adapter descriptor) will be returned.
* This method returns all values as strings. If a different type is required, it must be * explicitly converted to the appropriate type. * * @param propertyName The name of the property * @return A string representation of the property value. */ String getPropertyValue(String propertyName); /** * Returns the list of properties defined in the adapter descriptor * @return The names of all the properties defined in the adapter descriptor */ String[] getPropertyNames(); String getPropertyValueForService(String serviceName, String propertyName); /** * Get authentication details for the backend service * @param serviceName Backend service name * @return authentication details for backend service as json object */ JSONObject getBackendServiceAuth(String serviceName); /** * Get connection properties for the backend service * @param serviceName Backend service name * @return connection properties for backend service as json object */ JSONObject getBackendConnectionProperties(String serviceName); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy