01: package com.sun.portal.wsrp.producer.registration;
02:
03: import com.sun.portal.wsrp.common.WSRPFactory;
04: import com.sun.portal.wsrp.WSRPException;
05: import com.sun.portal.wsrp.common.stubs.Property;
06: import com.sun.portal.wsrp.common.stubs.RegistrationData;
07:
08: public class RegistrationRecord {
09: private String handle = null;
10: private boolean isEnabled = false;
11: private RegistrationData data = null;
12:
13: public RegistrationRecord(String registrationHandle,
14: boolean registrationStatus,
15: RegistrationData registrationData) {
16:
17: // FIXME: should check for null parameters
18: handle = registrationHandle;
19: isEnabled = registrationStatus;
20: data = registrationData;
21: }
22:
23: public String getRegistrationHandle() {
24: return handle;
25: }
26:
27: public boolean isEnabled() {
28: return isEnabled;
29: }
30:
31: public RegistrationData getRegistrationData() {
32: return data;
33: }
34:
35: public String getConsumerName() {
36: return data.getConsumerName();
37: }
38:
39: public String getConsumerAgent() {
40: return data.getConsumerAgent();
41: }
42:
43: public boolean isMethodGetSupported() {
44: return data.isMethodGetSupported();
45: }
46:
47: public String[] getConsumerModes() {
48: return data.getConsumerModes();
49: }
50:
51: public String[] getConsumerWindowStates() {
52: return data.getConsumerWindowStates();
53: }
54:
55: public String[] getConsumerUserScopes() {
56: return data.getConsumerUserScopes();
57: }
58:
59: public String[] getCustomUserProfileData() {
60: return data.getCustomUserProfileData();
61: }
62:
63: public Property[] getRegistrationProperties() {
64: return data.getRegistrationProperties();
65: }
66:
67: public String toString() {
68: StringBuffer b = new StringBuffer();
69: b.append("registrationHandle=").append(handle).append("\n");
70: b.append("isEnabled=").append(isEnabled).append("\n");
71: b.append("registrationData=\n");
72: try {
73: b.append(WSRPFactory.getInstance().getRegistrationDataXML(
74: data, true));
75: } catch (WSRPException we) {
76: b.append("<error>");
77: }
78:
79: return b.toString();
80: }
81: }
|