View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.syncope.ext.scimv2.api.data;
20  
21  import com.fasterxml.jackson.annotation.JsonCreator;
22  import com.fasterxml.jackson.annotation.JsonProperty;
23  import java.util.ArrayList;
24  import java.util.List;
25  import org.apache.syncope.ext.scimv2.api.type.Resource;
26  
27  public class ResourceType extends SCIMBean {
28  
29      private static final long serialVersionUID = -6559584102333757279L;
30  
31      private final List<String> schemas = List.of(Resource.ResourceType.schema());
32  
33      private final String id;
34  
35      private final String name;
36  
37      private final String endpoint;
38  
39      private final String description;
40  
41      private final String schema;
42  
43      private final List<SchemaExtension> schemaExtensions = new ArrayList<>();
44  
45      private final Meta meta;
46  
47      @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
48      public ResourceType(
49              @JsonProperty("id") final String id,
50              @JsonProperty("name") final String name,
51              @JsonProperty("endpoint") final String endpoint,
52              @JsonProperty("description") final String description,
53              @JsonProperty("schema") final String schema,
54              @JsonProperty("meta") final Meta meta) {
55  
56          this.id = id;
57          this.name = name;
58          this.endpoint = endpoint;
59          this.description = description;
60          this.schema = schema;
61          this.meta = meta;
62      }
63  
64      public List<String> getSchemas() {
65          return schemas;
66      }
67  
68      public String getId() {
69          return id;
70      }
71  
72      public String getName() {
73          return name;
74      }
75  
76      public String getEndpoint() {
77          return endpoint;
78      }
79  
80      public String getDescription() {
81          return description;
82      }
83  
84      public String getSchema() {
85          return schema;
86      }
87  
88      public List<SchemaExtension> getSchemaExtensions() {
89          return schemaExtensions;
90      }
91  
92      public Meta getMeta() {
93          return meta;
94      }
95  }