ResourceSetDescription.java revision a093731116a8c24d49b903df7602cf586e499b45
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS.
*/
/**
* Represents a resource set description created by an OAuth2 client (resource server).
*
* @since 13.0.0
*/
public class ResourceSetDescription {
private String resourceSetId;
private String resourceOwnerId;
private JsonValue description;
/**
* Constructs a new ResourceSetDescription instance.
*
* @param id The unique id across all resource sets.
* @param resourceSetId The id of the resource set.
* @param clientId The id of the client (resource server) which created the resource set.
* @param resourceOwnerId The id of the user that owns this resource set.
* @param description The description of the resource set.
*/
public ResourceSetDescription(String id, String resourceSetId, String clientId, String resourceOwnerId,
this.resourceSetId = resourceSetId;
this.resourceOwnerId = resourceOwnerId;
}
/**
* Bean-spec compliant constructor
*/
public ResourceSetDescription() {}
/**
* Gets the unique id of the resource set across all clients (resource servers).
*
* @return The unique id.
*/
return id;
}
/**
* Gets the realm for the Resource Set Description.
*
* @return The realm.
*/
return realm;
}
/**
* Sets the realm for the Resource Set Description.
*
* @param realm The realm.
*/
}
/**
* The id of the resource set.
*
* @return The resource set id.
*/
public String getResourceSetId() {
return resourceSetId;
}
/**
* Gets the client id that created the resource set.
*
* @return The client id.
*/
public String getClientId() {
return clientId;
}
/**
* Gets the resource owner id of the resource set.
*
* @return The resource owner id.
*/
public String getResourceOwnerId() {
return resourceOwnerId;
}
/**
* Gets the policy uri for the resource set.
*
* @return The policy uri.
*/
public String getPolicyUri() {
return policyUri;
}
/**
* Gets the name of the resource set.
*
* @return The resource set name.
*/
}
/**
* Gets the uri of the resource set.
*
* @return The resource set uri.
*/
}
/**
* Gets the type of the resource set.
*
* @return The resource set type.
*/
}
/**
* Gets the set of available scopes for the resource set.
*
* @return The available scopes.
*/
}
/**
* Gets the resource set icon uri.
*
* @return The icon uri.
*/
public URI getIconUri() {
}
/**
* Replaces the description of the resource set with the given {@code description}.
*
* @param description The description to replace with.
* @return This resource set description.
*/
return this;
}
/**
* Gets the resource set description as a {@code JsonValue}.
*
* @return The description as a {@code JsonValue}.
*/
public JsonValue getDescription() {
return description;
}
/**
* Returns the description of the resource set as a {@code Map}.
*
* @return The description.
*/
return description.asMap();
}
}
this.resourceSetId = resourceSetId;
}
}
this.resourceOwnerId = resourceOwnerId;
}
this.description = description;
}
}
if (this == o) {
return true;
}
return false;
}
return true;
}
public int hashCode() {
return result;
}
}