use of org.wso2.carbon.identity.api.server.idp.v1.model.MetaOutboundConnector in project identity-api-server by wso2.
the class ServerIdpManagementService method createMetaOutboundConnector.
private MetaOutboundConnector createMetaOutboundConnector(ProvisioningConnectorConfig connectorConfig) {
MetaOutboundConnector metaOutboundProvisioningConnector = new MetaOutboundConnector();
metaOutboundProvisioningConnector.setName(connectorConfig.getName());
metaOutboundProvisioningConnector.setDisplayName(connectorConfig.getName());
metaOutboundProvisioningConnector.setConnectorId(base64URLEncode(connectorConfig.getName()));
Property[] properties = connectorConfig.getProvisioningProperties();
List<MetaProperty> metaProperties = Arrays.stream(properties).map(propertyToExternalMeta).collect(Collectors.toList());
metaOutboundProvisioningConnector.setProperties(metaProperties);
return metaOutboundProvisioningConnector;
}
use of org.wso2.carbon.identity.api.server.idp.v1.model.MetaOutboundConnector in project identity-api-server by wso2.
the class ServerIdpManagementService method getMetaOutboundConnector.
/**
* Get meta information about a specific outbound provisioning connector supported by the IDPs.
*
* @param id Outbound Provisioning Connector ID.
* @return MetaOutboundConnector.
*/
public MetaOutboundConnector getMetaOutboundConnector(String id) {
String connectorName = base64URLDecode(id);
MetaOutboundConnector connector = null;
try {
ProvisioningConnectorConfig[] connectorConfigs = IdentityProviderServiceHolder.getIdentityProviderManager().getAllProvisioningConnectors();
if (ArrayUtils.isNotEmpty(connectorConfigs)) {
for (ProvisioningConnectorConfig connectorConfig : connectorConfigs) {
if (StringUtils.equals(connectorConfig.getName(), connectorName)) {
connector = createMetaOutboundConnector(connectorConfig);
break;
}
}
}
return connector;
} catch (IdentityProviderManagementException e) {
throw handleIdPException(e, Constants.ErrorMessage.ERROR_CODE_ERROR_RETRIEVING_META_CONNECTOR, id);
}
}
use of org.wso2.carbon.identity.api.server.idp.v1.model.MetaOutboundConnector 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