/** * {@inheritDoc} * * @return * @throws CouldNotPerformException */ @Override public List<UnitTemplate> getUnitTemplates() throws CouldNotPerformException { return unitTemplateRegistry.getMessages(); }
/** * {@inheritDoc} * * @return {@inheritDoc} * @throws CouldNotPerformException {@inheritDoc} */ @Override public List<UnitConfig> getDalUnitConfigs() throws CouldNotPerformException { return dalUnitConfigRegistry.getMessages(); }
/** * {@inheritDoc} * * @return * @throws CouldNotPerformException */ @Override public List<DeviceClass> getDeviceClasses() throws CouldNotPerformException { return deviceClassRegistry.getMessages(); }
@Override public List<UserActivityClass> getUserActivityClasses() throws CouldNotPerformException { return userActivityClassRegistry.getMessages(); }
@Override public List<AppClass> getAppClasses() throws CouldNotPerformException, InterruptedException { return appClassRegistry.getMessages(); }
/** * {@inheritDoc} * * @return * @throws CouldNotPerformException */ @Override public List<UnitConfig> getUnitGroupConfigs() throws CouldNotPerformException { return new ArrayList<>(unitGroupUnitConfigRegistry.getMessages()); }
@Override public List<UnitConfig> getUnitConfigs() throws CouldNotPerformException { ArrayList<UnitConfig> unitConfigList = new ArrayList<>(); for (final ProtoBufFileSynchronizedRegistry<String, UnitConfig, UnitConfig.Builder, UnitRegistryData.Builder> unitConfigRegistry : unitConfigRegistryList) { unitConfigList.addAll(unitConfigRegistry.getMessages()); } return unitConfigList; }
private boolean containsAuthorizationGroupByLabel(String label) throws CouldNotPerformException { for (UnitConfig unitConfig : authorizationGroupRegistry.getMessages()) { if (unitConfig.getLabel().equals(label)) { return true; } } return false; }
private boolean containsServiceTemplateByType(ServiceType type) throws CouldNotPerformException { for (ServiceTemplate serviceTemplate : registry.getMessages()) { if (serviceTemplate.getType() == type) { return true; } } return false; }
private boolean containsUnitTemplateByType(UnitType type) throws CouldNotPerformException { for (UnitTemplate unitTemplate : registry.getMessages()) { if (unitTemplate.getType() == type) { return true; } } return false; } }
private List<UnitType> getSubTypes(UnitType type) throws CouldNotPerformException { List<UnitType> unitTypes = new ArrayList<>(); for (UnitTemplate template : unitTemplateRegistry.getMessages()) { if (template.getIncludedTypeList().contains(type)) { unitTypes.add(template.getType()); } } return unitTypes; } }
@Override public List<UserActivityConfig> getUserActivityConfigsByType(UserActivityType userActivityType) throws CouldNotPerformException { List<UserActivityConfig> userActivityConfigList = new ArrayList<>(); String userActivityClassId = getUserActivityClassByType(userActivityType).getId(); for (UserActivityConfig userActivityConfig : userActivityConfigRegistry.getMessages()) { if (userActivityConfig.getUserActivityClassId().equals(userActivityClassId)) { userActivityConfigList.add(userActivityConfig); } } return userActivityConfigList; }
private UnitTemplate getUnitTemplateByType(UnitType type) throws CouldNotPerformException { for (UnitTemplate unitTemplate : unitTemplateRegistry.getMessages()) { if (unitTemplate.getType() == type) { return unitTemplate; } } throw new NotAvailableException("UnitTemplate with type[" + type + "]"); } }
private ServiceTemplate getServiceTemplateByType(ServiceType type) throws CouldNotPerformException { for (ServiceTemplate serviceTemplate : serviceTemplateRegistry.getMessages()) { if (serviceTemplate.getType() == type) { return serviceTemplate; } } throw new NotAvailableException("ServiceTemplate with type[" + type + "]"); } }
@Override public ServiceTemplate getServiceTemplateByType(ServiceType type) throws CouldNotPerformException { for (ServiceTemplate serviceTemplate : serviceTemplateRegistry.getMessages()) { if (serviceTemplate.getType() == type) { return serviceTemplate; } } throw new NotAvailableException("ServiceTemplate with type [" + type + "]"); }
@Override public UserActivityClass getUserActivityClassByType(UserActivityType userActivityType) throws CouldNotPerformException { for (UserActivityClass userActivityClass : userActivityClassRegistry.getMessages()) { if (userActivityClass.getType() == userActivityType) { return userActivityClass; } } throw new NotAvailableException("user activty class " + userActivityType.name()); }
private UnitTemplate getUnitTemplateByType(UnitType unitType) throws CouldNotPerformException { for (UnitTemplate unitTemplate : unitTemplateRegistry.getMessages()) { if (unitTemplate.getType() == unitType) { return unitTemplate; } } throw new NotAvailableException(UnitTemplate.class, unitType.name()); } }
private String getRootLocationId() throws CouldNotPerformException { for (UnitConfig location : locationRegistry.getMessages()) { if (location.getLocationConfig().getRoot()) { return location.getId(); } } throw new NotAvailableException("rootLocation"); } }
public String getServiceIdByType(ServiceType serviceType) throws CouldNotPerformException { for (ServiceTemplate serviceTemplate : serviceTemplateRegistry.getMessages()) { if (serviceTemplate.getType() == serviceType) { return serviceTemplate.getId(); } } throw new NotAvailableException("Now service template for type[" + serviceType.name() + "] found!", "service id"); } }
public String getServiceIdByType(ServiceTemplateType.ServiceTemplate.ServiceType serviceType) throws CouldNotPerformException { for (ServiceTemplateType.ServiceTemplate serviceTemplate : serviceTemplateRegistry.getMessages()) { if (serviceTemplate.getType() == serviceType) { return serviceTemplate.getId(); } } throw new NotAvailableException("Now service template for type[" + serviceType.name() + "] found!", "service id"); }