use of org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource in project airavata by apache.
the class ExperimentResource method getExperimentStatuses.
public List<ExperimentStatusResource> getExperimentStatuses() throws RegistryException {
List<ExperimentStatusResource> experimentStatusResources = new ArrayList();
List<ExperimentCatResource> resources = get(ResourceType.EXPERIMENT_STATUS);
for (ExperimentCatResource resource : resources) {
ExperimentStatusResource statusResource = (ExperimentStatusResource) resource;
experimentStatusResources.add(statusResource);
}
return experimentStatusResources;
}
use of org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource in project airavata by apache.
the class ExperimentResource method getExperimentInputs.
public List<ExperimentInputResource> getExperimentInputs() throws RegistryException {
List<ExperimentInputResource> experimentInputResources = new ArrayList();
List<ExperimentCatResource> resources = get(ResourceType.EXPERIMENT_INPUT);
for (ExperimentCatResource resource : resources) {
ExperimentInputResource inputResource = (ExperimentInputResource) resource;
experimentInputResources.add(inputResource);
}
return experimentInputResources;
}
use of org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource in project airavata by apache.
the class ExperimentResource method getProcessList.
public List<ProcessResource> getProcessList() throws RegistryException {
List<ProcessResource> processResources = new ArrayList();
List<ExperimentCatResource> resources = get(ResourceType.PROCESS);
for (ExperimentCatResource resource : resources) {
ProcessResource processResource = (ProcessResource) resource;
processResources.add(processResource);
}
return processResources;
}
use of org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource in project airavata by apache.
the class ExperimentRegistry method getLatestQueueStatuses.
public List<QueueStatusModel> getLatestQueueStatuses() throws RegistryException {
List<QueueStatusModel> queueStatusModels = new ArrayList<>();
List<ExperimentCatResource> queueStatusResources = (new QueueStatusResource()).get(ResourceType.QUEUE_STATUS);
for (ExperimentCatResource r : queueStatusResources) {
QueueStatusResource qResource = (QueueStatusResource) r;
QueueStatusModel queueStatusModel = new QueueStatusModel();
queueStatusModel.setHostName(qResource.getHostName());
queueStatusModel.setQueueName(qResource.getQueueName());
queueStatusModel.setTime(qResource.getTime());
queueStatusModel.setQueueUp(qResource.getQueueUp());
queueStatusModel.setRunningJobs(qResource.getRunningJobs());
queueStatusModel.setQueuedJobs(qResource.getQueuedJobs());
queueStatusModels.add(queueStatusModel);
}
return queueStatusModels;
}
use of org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource in project airavata by apache.
the class NotificationRegistry method getAllGatewayNotifications.
public List<Notification> getAllGatewayNotifications(String gatewayId) throws RegistryException {
List<Notification> notifications = new ArrayList<>();
NotificationResource notificationResource = new NotificationResource();
List<ExperimentCatResource> resources = notificationResource.getAllNotifications(gatewayId);
if (resources != null && !resources.isEmpty()) {
for (ExperimentCatResource e : resources) {
notifications.add(ThriftDataModelConversion.getNotification((NotificationResource) e));
}
}
Collections.sort(notifications, (o1, o2) -> (o2.getCreationTime() - o1.getCreationTime()) > 0 ? 1 : -1);
return notifications;
}
Aggregations