]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
f6cf4f6034e00edf7fe02dfc20110b1fc6aa38e9
[tmp/jakarta-migration.git] /
1 /**     
2  * CollectionObjectClient.java
3  *
4  * {Purpose of This Class}
5  *
6  * {Other Notes Relating to This Class (Optional)}
7  *
8  * $LastChangedBy: $
9  * $LastChangedRevision: $
10  * $LastChangedDate: $
11  *
12  * This document is a part of the source code and related artifacts
13  * for CollectionSpace, an open source collections management system
14  * for museums and related institutions:
15  *
16  * http://www.collectionspace.org
17  * http://wiki.collectionspace.org
18  *
19  * Copyright (C) 2009 {Contributing Institution}
20  *
21  * Licensed under the Educational Community License (ECL), Version 2.0.
22  * You may not use this file except in compliance with this License.
23  *
24  * You may obtain a copy of the ECL 2.0 License at
25  * https://source.collectionspace.org/collection-space/LICENSE.txt
26  */
27 package org.collectionspace.services.client;
28
29 import javax.ws.rs.core.Response;
30
31 import org.collectionspace.services.collectionobject.CollectionobjectsCommon;
32
33 // FIXME: http://issues.collectionspace.org/browse/CSPACE-1684
34
35 /**
36  * CollectionObjectClient.java
37  *
38  * $LastChangedRevision: $
39  * $LastChangedDate: $
40  */
41 public class CollectionObjectClient extends AbstractCommonListPoxServiceClientImpl<CollectionObjectProxy, CollectionobjectsCommon> {
42
43     public static final String SERVICE_NAME = "collectionobjects";
44     public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
45     public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
46     public static final String SERVICE_PATH_PROXY = SERVICE_PATH + "/";
47     public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
48     public static final String SERVICE_COMMON_PART_NAME = SERVICE_NAME + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
49
50     public CollectionObjectClient() {
51                 super();
52         }
53
54     public CollectionObjectClient(String clientPropertiesFilename) {
55                 super(clientPropertiesFilename);
56         }
57
58         @Override
59     public String getServiceName() {
60         return SERVICE_NAME;
61     }
62
63     @Override
64     public String getServicePathComponent() {
65         return SERVICE_PATH_COMPONENT;
66     }
67
68     @Override
69     public Class<CollectionObjectProxy> getProxyClass() {
70         return CollectionObjectProxy.class;
71     }
72
73     /**
74      * Roundtrip.
75      * 
76      * This is an intentionally empty method that is used for performance test 
77      * to get a rough time estimate of the client to server response-request overhead.
78      * 
79      * @see org.collectionspace.services.client.CollectionObjectProxy#roundtrip()
80      * @return the client response< response>
81      */
82     public Response roundtrip(int ms) {
83         getLogger().debug(">>>>Roundtrip start.");
84         Response result = getProxy().roundtrip(ms);
85         getLogger().debug("<<<<Roundtrip stop.");
86         return result;
87     }
88 }