use of org.wso2.carbon.identity.api.server.idp.v1.model.MetaOutboundConnectorListItem in project identity-api-server by wso2.
the class ServerIdpManagementService method createMetaOutboundConnectorListItem.
private MetaOutboundConnectorListItem createMetaOutboundConnectorListItem(ProvisioningConnectorConfig connectorConfig) {
MetaOutboundConnectorListItem metaOutboundProvisioningConnector = new MetaOutboundConnectorListItem();
metaOutboundProvisioningConnector.setName(connectorConfig.getName());
String connectorId = base64URLEncode(connectorConfig.getName());
metaOutboundProvisioningConnector.setConnectorId(connectorId);
metaOutboundProvisioningConnector.setSelf(ContextLoader.buildURIForBody(String.format(V1_API_PATH_COMPONENT + IDP_PATH_COMPONENT + "/meta/outbound-provisioning-connectors/%s", connectorId)).toString());
return metaOutboundProvisioningConnector;
}
use of org.wso2.carbon.identity.api.server.idp.v1.model.MetaOutboundConnectorListItem in project identity-api-server by wso2.
the class ServerIdpManagementService method getMetaOutboundConnectors.
/**
* Get meta information about Identity Provider's outbound provisioning connectors.
*
* @return List of meta outbound provisioning connectors.
*/
public List<MetaOutboundConnectorListItem> getMetaOutboundConnectors() {
List<MetaOutboundConnectorListItem> metaOutboundConnectors = new ArrayList<>();
try {
ProvisioningConnectorConfig[] connectorConfigs = IdentityProviderServiceHolder.getIdentityProviderManager().getAllProvisioningConnectors();
if (ArrayUtils.isNotEmpty(connectorConfigs)) {
for (ProvisioningConnectorConfig connectorConfig : connectorConfigs) {
MetaOutboundConnectorListItem metaOutboundConnector = createMetaOutboundConnectorListItem(connectorConfig);
metaOutboundConnectors.add(metaOutboundConnector);
}
}
return metaOutboundConnectors;
} catch (IdentityProviderManagementException e) {
throw handleIdPException(e, Constants.ErrorMessage.ERROR_CODE_ERROR_RETRIEVING_META_CONNECTORS, null);
}
}
Aggregations