001    /*
002     * Copyright 2011-2012 UnboundID Corp.
003     *
004     * This program is free software; you can redistribute it and/or modify
005     * it under the terms of the GNU General Public License (GPLv2 only)
006     * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
007     * as published by the Free Software Foundation.
008     *
009     * This program is distributed in the hope that it will be useful,
010     * but WITHOUT ANY WARRANTY; without even the implied warranty of
011     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012     * GNU General Public License for more details.
013     *
014     * You should have received a copy of the GNU General Public License
015     * along with this program; if not, see <http://www.gnu.org/licenses>.
016     */
017    
018    package com.unboundid.scim.sdk;
019    
020    
021    
022    /**
023     * This class defines a number of constants used in Simple Cloud Identity
024     * Management (SCIM) interfaces.
025     */
026    public final class SCIMConstants
027    {
028      /**
029       * The SCIM name for the schemas attribute.
030       */
031      public static final String SCHEMAS_ATTRIBUTE_NAME = "schemas";
032      /**
033       * The namespace label associated with the default schema.
034       */
035      public static final String DEFAULT_SCHEMA_PREFIX = "scim";
036    
037      /**
038       * Prevent this class from being instantiated.
039       */
040      private SCIMConstants()
041      {
042        // No implementation is required.
043      }
044    
045    
046    
047      /**
048       * The URI of the SCIM Core schema.
049       */
050      public static final String SCHEMA_URI_CORE =
051          "urn:scim:schemas:core:1.0";
052    
053      /**
054       * The URI of the SCIM Enterprise schema extension.
055       */
056      public static final String SCHEMA_URI_ENTERPRISE_EXTENSION =
057          "urn:scim:schemas:extension:enterprise:1.0";
058    
059      /**
060       * The resource name for the Service Provider Configuration in the core
061       * schema.
062       */
063      public static final String RESOURCE_NAME_SERVICE_PROVIDER_CONFIG =
064          "ServiceProviderConfig";
065    
066      /**
067       * The resource name for the Group resource in the core schema.
068       */
069      public static final String RESOURCE_NAME_GROUP = "Group";
070    
071      /**
072       * The resource name for the User resource in the core schema.
073       */
074      public static final String RESOURCE_NAME_USER = "User";
075    
076      /**
077       * The resource name for the Schema resource in the core schema.
078       */
079      public static final String RESOURCE_NAME_SCHEMA = "Schema";
080    
081      /**
082       * The end point for the Service Provider Configuration in the core
083       * schema.
084       */
085      public static final String RESOURCE_ENDPOINT_SERVICE_PROVIDER_CONFIG =
086          "ServiceProviderConfigs";
087    
088      /**
089       * The end point for Groups in the REST protocol.
090       */
091      public static final String RESOURCE_ENDPOINT_GROUPS = "Groups";
092    
093      /**
094       * The end point for Users in the REST protocol.
095       */
096      public static final String RESOURCE_ENDPOINT_USERS = "Users";
097    
098      /**
099       * The end point for Schemas in the REST protocol.
100       */
101      public static final String RESOURCE_ENDPOINT_SCHEMAS = "Schemas";
102    
103      /**
104       * The HTTP query parameter used in a URI to select specific SCIM attributes.
105       */
106      public static final String QUERY_PARAMETER_ATTRIBUTES = "attributes";
107    
108      /**
109       * The HTTP query parameter used in a URI to provide a filter expression.
110       */
111      public static final String QUERY_PARAMETER_FILTER = "filter";
112    
113      /**
114       * The HTTP query parameter used in a URI to sort by a SCIM attribute.
115       */
116      public static final String QUERY_PARAMETER_SORT_BY = "sortBy";
117    
118      /**
119       * The HTTP query parameter used in a URI to specify the sort order.
120       */
121      public static final String QUERY_PARAMETER_SORT_ORDER = "sortOrder";
122    
123      /**
124       * The HTTP query parameter used in a URI to specify the starting index
125       * for page results.
126       */
127      public static final String QUERY_PARAMETER_PAGE_START_INDEX = "startIndex";
128    
129      /**
130       * The HTTP query parameter used in a URI to specify the maximum size of
131       * a page of results.
132       */
133      public static final String QUERY_PARAMETER_PAGE_SIZE = "count";
134    
135      /**
136       * The name of the HTTP Origin field.
137       */
138      public static final String HEADER_NAME_ORIGIN  =
139          "Origin";
140    
141      /**
142       * The name of the HTTP Access-Control-Allow-Origin field.
143       */
144      public static final String HEADER_NAME_ACCESS_CONTROL_ALLOW_ORIGIN =
145          "Access-Control-Allow-Origin";
146    
147      /**
148       * The name of the HTTP Access-Control-Allow-Credentials field.
149       */
150      public static final String HEADER_NAME_ACCESS_CONTROL_ALLOW_CREDENTIALS  =
151          "Access-Control-Allow-Credentials";
152    
153      /**
154       * The character that separates the schema URI from the basic attribute name
155       * in a fully qualified attribute name. e.g. urn:scim:schemas:core:1.0:name
156       * TODO: Should it be ':' or '.'?
157       */
158      public static final char SEPARATOR_CHAR_QUALIFIED_ATTRIBUTE = ':';
159    }