Package org.openremote.manager.dashboard
Class DashboardResourceImpl
java.lang.Object
org.openremote.container.web.WebResource
org.openremote.manager.web.ManagerWebResource
org.openremote.manager.dashboard.DashboardResourceImpl
- All Implemented Interfaces:
org.openremote.container.security.AuthContext,org.openremote.model.dashboard.DashboardResource
public class DashboardResourceImpl
extends ManagerWebResource
implements org.openremote.model.dashboard.DashboardResource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DashboardStorageServicestatic final Loggerprotected final org.openremote.container.message.MessageBrokerServiceFields inherited from class org.openremote.manager.web.ManagerWebResource
identityService, timerServiceFields inherited from class org.openremote.container.web.WebResource
application, httpHeaders, request, response, securityContext, uriInfo -
Constructor Summary
ConstructorsConstructorDescriptionDashboardResourceImpl(org.openremote.container.timer.TimerService timerService, ManagerIdentityService identityService, DashboardStorageService dashboardStorageService, org.openremote.container.message.MessageBrokerService messageBrokerService) -
Method Summary
Modifier and TypeMethodDescriptionorg.openremote.model.dashboard.Dashboardcreate(org.openremote.model.http.RequestParams requestParams, org.openremote.model.dashboard.Dashboard dashboard) protected org.openremote.model.query.DashboardQuerycreateDashboardQuery(String realm) Function that builds anDashboardQueryobject, based on user permissions.voidorg.openremote.model.dashboard.Dashboardorg.openremote.model.dashboard.Dashboard[]getAllRealmDashboards(org.openremote.model.http.RequestParams requestParams, String realm) org.openremote.model.dashboard.Dashboard[]query(org.openremote.model.http.RequestParams requestParams, org.openremote.model.query.DashboardQuery query) protected org.openremote.model.query.DashboardQuerysanitizeDashboardQuery(org.openremote.model.query.DashboardQuery query) Function that corrects anDashboardQueryobject, based on user permissions.org.openremote.model.dashboard.Dashboardupdate(org.openremote.model.http.RequestParams requestParams, org.openremote.model.dashboard.Dashboard dashboard) Methods inherited from class org.openremote.manager.web.ManagerWebResource
getAuthenticatedRealm, getRequestRealm, isRealmActiveAndAccessible, isRealmActiveAndAccessible, isRestrictedUserMethods inherited from class org.openremote.container.web.WebResource
getApplication, getAuthContext, getAuthenticatedRealmName, getClientId, getClientRemoteAddress, getContainer, getRequestRealmName, getUserId, getUsername, hasRealmRole, hasResourceRole, isAuthenticatedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openremote.container.security.AuthContext
hasResourceRoleOrIsSuperUser, isRealmAccessibleByUser, isSuperUser
-
Field Details
-
LOG
-
dashboardStorageService
-
messageBrokerService
protected final org.openremote.container.message.MessageBrokerService messageBrokerService
-
-
Constructor Details
-
DashboardResourceImpl
public DashboardResourceImpl(org.openremote.container.timer.TimerService timerService, ManagerIdentityService identityService, DashboardStorageService dashboardStorageService, org.openremote.container.message.MessageBrokerService messageBrokerService)
-
-
Method Details
-
getAllRealmDashboards
public org.openremote.model.dashboard.Dashboard[] getAllRealmDashboards(org.openremote.model.http.RequestParams requestParams, String realm) - Specified by:
getAllRealmDashboardsin interfaceorg.openremote.model.dashboard.DashboardResource
-
get
public org.openremote.model.dashboard.Dashboard get(org.openremote.model.http.RequestParams requestParams, String realm, String dashboardId) - Specified by:
getin interfaceorg.openremote.model.dashboard.DashboardResource
-
query
public org.openremote.model.dashboard.Dashboard[] query(org.openremote.model.http.RequestParams requestParams, org.openremote.model.query.DashboardQuery query) - Specified by:
queryin interfaceorg.openremote.model.dashboard.DashboardResource
-
create
public org.openremote.model.dashboard.Dashboard create(org.openremote.model.http.RequestParams requestParams, org.openremote.model.dashboard.Dashboard dashboard) - Specified by:
createin interfaceorg.openremote.model.dashboard.DashboardResource
-
update
public org.openremote.model.dashboard.Dashboard update(org.openremote.model.http.RequestParams requestParams, org.openremote.model.dashboard.Dashboard dashboard) - Specified by:
updatein interfaceorg.openremote.model.dashboard.DashboardResource
-
delete
public void delete(org.openremote.model.http.RequestParams requestParams, String realm, String dashboardId) - Specified by:
deletein interfaceorg.openremote.model.dashboard.DashboardResource
-
sanitizeDashboardQuery
protected org.openremote.model.query.DashboardQuery sanitizeDashboardQuery(org.openremote.model.query.DashboardQuery query) Function that corrects anDashboardQueryobject, based on user permissions. Automatically fills NULL values, adjusts access filters based on roles, etc.- Parameters:
query- The query to correct- Returns:
- A DashboardQuery with the correct permissions based on the user.
-
createDashboardQuery
Function that builds anDashboardQueryobject, based on user permissions. Automatically fills NULL values, adjusts access filters based on roles, etc.- Parameters:
realm- The realm to create a DashboardQuery for.- Returns:
- An instantiated DashboardQuery with the correct permissions based on the user.
-