@Override public IDeviceStreamData addDeviceStreamData(UUID streamId, IDeviceStreamDataCreateRequest request) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
public ICommandResponse refresh(ILifecycleProgressMonitor monitor) throws SiteWhereException { try { return cacheAssetData(); } catch (SiteWhereException e) { return new CommandResponse(CommandResult.Failed, e.getMessage()); } }
public ICommandResponse refresh(ILifecycleProgressMonitor monitor) throws SiteWhereException { try { reload(); showLoadResults(); return new CommandResponse(CommandResult.Successful, "Refresh successful."); } catch (SiteWhereException e) { return new CommandResponse(CommandResult.Failed, e.getMessage()); } }
@Override public ISearchResults<IDeviceStreamData> listDeviceStreamDataForAssignment(UUID streamId, IDateRangeSearchCriteria criteria) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
@Override public ICommandResponse call() throws Exception { try { getEngine().lifecycleStop(getProgressMonitor(), new PersistentShutdownConstraint()); if (getEngine().getLifecycleStatus() == LifecycleStatus.Error) { return new CommandResponse(CommandResult.Failed, getEngine().getLifecycleError().getMessage()); } } catch (Exception e) { return new CommandResponse(CommandResult.Failed, e.getMessage()); } return new CommandResponse(CommandResult.Successful, "Tenant engine stopped."); } }
@Override public List<IGrantedAuthority> addGrantedAuthorities(String username, List<String> authorities) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
@Override public ISearchResults<IDeviceStreamData> listDeviceStreamDataForAssignment(UUID streamId, IDateRangeSearchCriteria criteria) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
@Override public ISearchResults<IDeviceCommandResponse> listDeviceCommandInvocationResponses(UUID invocationId) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
@Override public List<IGrantedAuthority> removeGrantedAuthorities(String username, List<String> authorities) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
@Override public ISearchResults<IDeviceStreamData> listDeviceStreamDataForAssignment(UUID streamId, IDateRangeSearchCriteria criteria) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
@Override public IGrantedAuthority updateGrantedAuthority(String name, IGrantedAuthorityCreateRequest request) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
@Override public String convertRoute(Object scriptResult) throws SiteWhereException { if (!(scriptResult instanceof String)) { throw new SiteWhereException("Multicaster script result expected to be of type String."); } return (String) scriptResult; } }
/** * Get the MongoClient. * * @return */ public MongoClient getMongoClient() throws SiteWhereException { if (client == null) { throw new SiteWhereException("Client is null. Mongo client was not properly initialized."); } return client; }
@Override public URI getFilesystemConfigurationRoot() throws SiteWhereException { if (configurationRoot != null) { return configurationRoot; } throw new SiteWhereException("Configuration root not set."); }
@Override public String convertRoute(Object scriptResult) throws SiteWhereException { if (!(scriptResult instanceof String)) { throw new SiteWhereException("Multicaster script result expected to be of type String."); } return (String) scriptResult; } }
@Override public List<IGrantedAuthority> removeGrantedAuthorities(String username, List<String> authorities) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
@Override public IGrantedAuthority updateGrantedAuthority(String name, IGrantedAuthorityCreateRequest request) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
@Override public IDeviceStreamData addDeviceStreamData(UUID streamId, IDeviceStreamDataCreateRequest request) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
@Override public IDeviceStreamData addDeviceStreamData(UUID streamId, IDeviceStreamDataCreateRequest request) throws SiteWhereException { throw new SiteWhereException("Not implemented."); }
/** * Require that a non-String field be non-null. * * @param field * @throws SiteWhereException */ protected static void requireNotNull(String fieldName, Object field) throws SiteWhereException { if (field == null) { throw new SiteWhereException("Field '" + fieldName + "' is required."); } }