use of com.emc.storageos.model.protection.ProtectionSystemList in project coprhd-controller by CoprHD.
the class ProtectionSystemService method getProtectionSystems.
/**
* Gets the id, name, and self link for all registered protection systems.
*
* @brief List protection systems
* @return A reference to a ProtectionSystemList.
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SYSTEM_ADMIN, Role.SYSTEM_MONITOR })
public ProtectionSystemList getProtectionSystems() {
ProtectionSystemList systemsList = new ProtectionSystemList();
ProtectionSystem system = null;
List<URI> ids = _dbClient.queryByType(ProtectionSystem.class, true);
for (URI id : ids) {
system = _dbClient.queryObject(ProtectionSystem.class, id);
if (system != null && RegistrationStatus.REGISTERED.toString().equalsIgnoreCase(system.getRegistrationStatus())) {
systemsList.getSystems().add(toNamedRelatedResource(system));
}
}
return systemsList;
}
Aggregations