View Javadoc
1   /*
2    * Licensed to The Apereo Foundation under one or more contributor license
3    * agreements. See the NOTICE file distributed with this work for additional
4    * information regarding copyright ownership.
5    *
6    *
7    * The Apereo Foundation licenses this file to you under the Educational
8    * Community License, Version 2.0 (the "License"); you may not use this file
9    * except in compliance with the License. You may obtain a copy of the License
10   * at:
11   *
12   *   http://opensource.org/licenses/ecl2.txt
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
17   * License for the specific language governing permissions and limitations under
18   * the License.
19   *
20   */
21  
22  package org.opencastproject.rest;
23  
24  /**
25   * Constant definitions used to define and consume Opencast REST services.
26   */
27  public interface RestConstants {
28  
29    /** The service property indicating the type of service. This is an arbitrary ID, not necessarily a java interface. */
30    String SERVICE_TYPE_PROPERTY = "opencast.service.type";
31  
32    /** The service property indicating the URL path that the service is attempting to claim */
33    @Deprecated
34    String SERVICE_PATH_PROPERTY = "opencast.service.path";
35  
36    /** The service property indicating whether the service should be published in the service registry */
37    String SERVICE_PUBLISH_PROPERTY = "opencast.service.publish";
38  
39    /** The service property indicating that this service should be registered in the remote service registry */
40    String SERVICE_JOBPRODUCER_PROPERTY = "opencast.service.jobproducer";
41  
42    /** The ID by which this http context is known by the extended http service */
43    String HTTP_CONTEXT_ID = "opencast";
44  
45    /** The OSGI service filter that returns all registered services published as REST endpoints */
46    String SERVICES_FILTER = "(&(!(objectClass=javax.servlet.Servlet))(" + RestConstants.SERVICE_PATH_PROPERTY + "=*))";
47  
48    /** The bundle header used to find the static resource URL alias */
49    String HTTP_ALIAS = "Http-Alias";
50  
51    /** The bundle header used to find the static resource classpath */
52    String HTTP_CLASSPATH = "Http-Classpath";
53  
54    /** The bundle header used to redirect to welcome file */
55    String HTTP_SPA_REDIRECT = "Http-Spa-Redirect";
56  
57    /** The bundle header used to find the static resource welcome file */
58    String HTTP_WELCOME = "Http-Welcome";
59  
60    /**
61     * The amount of time in seconds to wait for a session to be inactive before deallocating it. Applied to all sessions
62     * with the last filter in the chain.
63     **/
64    int MAX_INACTIVE_INTERVAL = 1800;
65  }