use of org.wso2.carbon.identity.api.server.fetch.remote.v1.model.RemoteFetchConfigurationGetResponse in project identity-api-server by wso2.
the class ServerRemoteFetchConfigManagementService method createRemoteFetchConfigurationResponse.
/**
* This method is used to create GET response from remote fetch configuration id.
*
* @param remoteFetchConfiguration remote fetch configuration domain object.
* @return RemoteFetchConfigurationGetResponse.
* @throws RemoteFetchCoreException RemoteFetchCoreException
*/
private RemoteFetchConfigurationGetResponse createRemoteFetchConfigurationResponse(RemoteFetchConfiguration remoteFetchConfiguration) throws RemoteFetchCoreException {
RemoteFetchConfigurationGetResponse remoteFetchConfigurationGetResponse = new RemoteFetchConfigurationGetResponse();
ActionListenerAttributes actionListenerAttributes = createActionListenerAttributeProperties(remoteFetchConfiguration);
RepositoryManagerAttributes repositoryManagerAttributes = createRepositoryManagerAttributeProperties(remoteFetchConfiguration);
remoteFetchConfigurationGetResponse.setActionListenerAttributes(actionListenerAttributes);
remoteFetchConfigurationGetResponse.setRepositoryManagerAttributes(repositoryManagerAttributes);
remoteFetchConfigurationGetResponse.setConfigurationDeployerAttributes(null);
setIfNotNull(remoteFetchConfiguration.getRemoteFetchConfigurationId(), remoteFetchConfigurationGetResponse::setId);
setIfNotNull(remoteFetchConfiguration.isEnabled(), remoteFetchConfigurationGetResponse::setIsEnabled);
setIfNotNull(remoteFetchConfiguration.getRemoteFetchName(), remoteFetchConfigurationGetResponse::setRemoteFetchName);
setIfNotNull(remoteFetchConfiguration.getRepositoryManagerType(), remoteFetchConfigurationGetResponse::setRepositoryManagerType);
setIfNotNull(remoteFetchConfiguration.getConfigurationDeployerType(), remoteFetchConfigurationGetResponse::setConfigurationDeployerType);
setIfNotNull(remoteFetchConfiguration.getRepositoryManagerType(), remoteFetchConfigurationGetResponse::setRepositoryManagerType);
StatusListResponse statusListResponse = this.createStatusListResponse(RemoteFetchServiceHolder.getRemoteFetchConfigurationService().getDeploymentRevisions(remoteFetchConfiguration.getRemoteFetchConfigurationId()));
remoteFetchConfigurationGetResponse.setStatus(statusListResponse);
return remoteFetchConfigurationGetResponse;
}
Aggregations