Class StatisticsPolicyEnforcementPoint

java.lang.Object
org.gcube.informationsystem.resourceregistry.pep.PolicyEnforcementPoint
org.gcube.informationsystem.resourceregistry.statistics.StatisticsPolicyEnforcementPoint

public class StatisticsPolicyEnforcementPoint extends PolicyEnforcementPoint
Policy Enforcement Point (PEP) for the public statistics.

The statistics are public: the request carries no token and no role is checked. The endpoint accepts no query parameter; any one sent is ignored with a warning.

Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • StatisticsPolicyEnforcementPoint

      public StatisticsPolicyEnforcementPoint(jakarta.ws.rs.container.ContainerRequestContext requestContext)
      Parameters:
      requestContext - the JAX-RS ContainerRequestContext for the current request
  • Method Details

    • read

      public String read() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Returns the last computed statistics.
      Returns:
      the statistics document as JSON
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the document cannot be serialized