use of org.wso2.carbon.identity.api.server.identity.governance.v1.model.MetaRes in project identity-api-server by wso2.
the class ServerIdentityGovernanceService method buildConnectorResDTO.
private ConnectorRes buildConnectorResDTO(ConnectorConfig connectorConfig) {
ConnectorRes connectorsResDTO = new ConnectorRes();
connectorsResDTO.setId(Base64.getUrlEncoder().withoutPadding().encodeToString(connectorConfig.getName().getBytes(StandardCharsets.UTF_8)));
connectorsResDTO.setName(connectorConfig.getName());
connectorsResDTO.setFriendlyName(connectorConfig.getFriendlyName());
connectorsResDTO.setCategory(connectorConfig.getCategory());
connectorsResDTO.setSubCategory(connectorConfig.getSubCategory());
connectorsResDTO.setOrder(connectorConfig.getOrder());
List<PropertyRes> properties = new ArrayList<>();
for (Property property : connectorConfig.getProperties()) {
PropertyRes propertyRes = new PropertyRes();
propertyRes.setName(property.getName());
propertyRes.setValue(property.getValue());
propertyRes.setDisplayName(property.getDisplayName());
propertyRes.setDescription(property.getDescription() != null ? property.getDescription() : "");
MetaRes metaRes = new MetaRes();
metaRes.setType(property.getType());
metaRes.setRegex(property.getRegex());
metaRes.setGroupID(property.getGroupId());
propertyRes.setMeta(metaRes);
properties.add(propertyRes);
}
connectorsResDTO.setProperties(properties);
return connectorsResDTO;
}
Aggregations