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

    Fields
    Modifier and Type
    Field
    Description
    protected final DashboardStorageService
     
    static final Logger
     
    protected final org.openremote.container.message.MessageBrokerService
     

    Fields inherited from class org.openremote.manager.web.ManagerWebResource

    identityService, timerService

    Fields inherited from class org.openremote.container.web.WebResource

    application, httpHeaders, request, response, securityContext, uriInfo
  • Constructor Summary

    Constructors
    Constructor
    Description
    DashboardResourceImpl(org.openremote.container.timer.TimerService timerService, ManagerIdentityService identityService, DashboardStorageService dashboardStorageService, org.openremote.container.message.MessageBrokerService messageBrokerService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.openremote.model.dashboard.Dashboard
    create(org.openremote.model.http.RequestParams requestParams, org.openremote.model.dashboard.Dashboard dashboard)
     
    protected org.openremote.model.query.DashboardQuery
    Function that builds an DashboardQuery object, based on user permissions.
    void
    delete(org.openremote.model.http.RequestParams requestParams, String realm, String dashboardId)
     
    org.openremote.model.dashboard.Dashboard
    get(org.openremote.model.http.RequestParams requestParams, String realm, String dashboardId)
     
    org.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.DashboardQuery
    sanitizeDashboardQuery(org.openremote.model.query.DashboardQuery query)
    Function that corrects an DashboardQuery object, based on user permissions.
    org.openremote.model.dashboard.Dashboard
    update(org.openremote.model.http.RequestParams requestParams, org.openremote.model.dashboard.Dashboard dashboard)
     

    Methods inherited from class org.openremote.container.web.WebResource

    getApplication, getAuthContext, getAuthenticatedRealmName, getClientId, getClientRemoteAddress, getContainer, getRequestRealmName, getUserId, getUsername, hasRealmRole, hasResourceRole, isAuthenticated

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.openremote.container.security.AuthContext

    hasResourceRoleOrIsSuperUser, isRealmAccessibleByUser, isSuperUser
  • Field Details

    • LOG

      public static final Logger LOG
    • dashboardStorageService

      protected final DashboardStorageService 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:
      getAllRealmDashboards in interface org.openremote.model.dashboard.DashboardResource
    • get

      public org.openremote.model.dashboard.Dashboard get(org.openremote.model.http.RequestParams requestParams, String realm, String dashboardId)
      Specified by:
      get in interface org.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:
      query in interface org.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:
      create in interface org.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:
      update in interface org.openremote.model.dashboard.DashboardResource
    • delete

      public void delete(org.openremote.model.http.RequestParams requestParams, String realm, String dashboardId)
      Specified by:
      delete in interface org.openremote.model.dashboard.DashboardResource
    • sanitizeDashboardQuery

      protected org.openremote.model.query.DashboardQuery sanitizeDashboardQuery(org.openremote.model.query.DashboardQuery query)
      Function that corrects an DashboardQuery object, 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

      protected org.openremote.model.query.DashboardQuery createDashboardQuery(String realm)
      Function that builds an DashboardQuery object, 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.