public class ProtectedResource extends Object
| Modifier and Type | Method and Description |
|---|---|
ResourceRepresentation |
create(ResourceRepresentation resource)
Creates a new resource.
|
void |
delete(String id)
Deletes a resource with the given
id. |
<R> R |
find(String id,
String name,
String uri,
String owner,
String type,
String scope,
boolean matchingUri,
boolean deep,
Integer firstResult,
Integer maxResult)
Query the server for any resource with the matching arguments.
|
String[] |
find(String id,
String name,
String uri,
String owner,
String type,
String scope,
boolean matchingUri,
Integer firstResult,
Integer maxResult)
Query the server for any resource with the matching arguments.
|
String[] |
findAll()
Query the server for all resources.
|
ResourceRepresentation |
findById(String id)
Query the server for a resource given its
id. |
List<ResourceRepresentation> |
findByMatchingUri(String uri)
Returns a list of resources that best matches the given
uri. |
ResourceRepresentation |
findByName(String name)
Query the server for a resource given its
name where the owner is the resource server itself. |
ResourceRepresentation |
findByName(String name,
String ownerId)
Query the server for a resource given its
name and a given ownerId. |
List<ResourceRepresentation> |
findByUri(String uri)
Query the server for all resources with the given uri.
|
void |
update(ResourceRepresentation resource)
Updates a resource.
|
public ResourceRepresentation create(ResourceRepresentation resource)
resource - the resource dataRegistrationResponsepublic void update(ResourceRepresentation resource)
resource - the resource datapublic ResourceRepresentation findById(String id)
id.id - the resource idResourceRepresentationpublic ResourceRepresentation findByName(String name)
name where the owner is the resource server itself.name - the resource nameResourceRepresentationpublic ResourceRepresentation findByName(String name, String ownerId)
name and a given ownerId.name - the resource nameownerId - the owner idResourceRepresentationpublic String[] find(String id, String name, String uri, String owner, String type, String scope, boolean matchingUri, Integer firstResult, Integer maxResult)
id - the resource idname - the resource nameuri - the resource uriowner - the resource ownertype - the resource typescope - the resource scopematchingUri - the resource uri. Use this parameter to lookup a resource that best match the given urifirstResult - the position of the first resource to retrievemaxResult - the maximum number of resources to retrievepublic <R> R find(String id, String name, String uri, String owner, String type, String scope, boolean matchingUri, boolean deep, Integer firstResult, Integer maxResult)
id - the resource idname - the resource nameuri - the resource uriowner - the resource ownertype - the resource typescope - the resource scopematchingUri - the resource uri. Use this parameter to lookup a resource that best match the given urideep - if the result should be a list of resource representations with details about the resource. If false, only ids are returnedfirstResult - the position of the first resource to retrievemaxResult - the maximum number of resources to retrievepublic String[] findAll()
public void delete(String id)
id.id - the resource idpublic List<ResourceRepresentation> findByUri(String uri)
uri - the resource uripublic List<ResourceRepresentation> findByMatchingUri(String uri)
uri. This method queries the server for resources whose
ResourceRepresentation#uri best matches the given uri.uri - the resource uri to matchCopyright © 2019 JBoss by Red Hat. All rights reserved.