1 package org.collectionspace.hello.client;
3 import javax.ws.rs.core.Response;
5 import org.collectionspace.hello.DomainIdentifier;
6 import org.jboss.resteasy.client.ProxyFactory;
7 import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
8 import org.jboss.resteasy.client.ClientResponse;
9 import org.jboss.resteasy.spi.ResteasyProviderFactory;
14 * @version $Revision:$
16 public class DomainIdentifierClient extends CollectionSpaceClient {
22 private static final DomainIdentifierClient instance = new DomainIdentifierClient();
26 private DomainIdentifierProxy identifierProxy;
30 * Create a new IdentifierClient.
33 private DomainIdentifierClient() {
34 ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
35 RegisterBuiltin.register(factory);
36 identifierProxy = ProxyFactory.create(DomainIdentifierProxy.class, getURL());
44 public static DomainIdentifierClient getInstance() {
51 * @see org.collectionspace.hello.client.IdentifierProxy#getIdentifier(java.lang.Long)
53 public ClientResponse<DomainIdentifier> getIdentifier(String id) {
54 return identifierProxy.getIdentifier(id);
60 * @see org.collectionspace.hello.client.IdentifierProxy#createIdentifier(org.collectionspace.hello.client.entity.Identifier)
62 public ClientResponse<Response> createIdentifier(DomainIdentifier identifier) {
63 return identifierProxy.createIdentifier(identifier);