1 5 6 package org.exoplatform.services.wsrp.consumer.adapters; 7 8 import org.exoplatform.services.wsrp.consumer.WSRPBaseRequest; 9 import org.exoplatform.services.wsrp.type.ClientData; 10 11 17 18 public class WSRPBaseRequestAdapter implements WSRPBaseRequest{ 19 20 private String sessionID; 21 private String portletInstanceKey; 22 private String navigationalState; 23 private String windowState; 24 private String mode; 25 private ClientData clientData; 26 private String [] locales; 27 private String [] modes; 28 private String [] windowStates; 29 private String [] mimeTypes; 30 private String [] characterEncodingSet; 31 private String userAuthentication; 32 33 public String getSessionID() { 34 return sessionID; 35 } 36 37 public void setSessionID(String sessionID) { 38 this.sessionID = sessionID; 39 } 40 41 public String getPortletInstanceKey() { 42 return portletInstanceKey; 43 } 44 45 public void setPortletInstanceKey(String portletInstanceKey) { 46 this.portletInstanceKey = portletInstanceKey; 47 } 48 49 public String getNavigationalState() { 50 return navigationalState; 51 } 52 53 public void setNavigationalState(String navigationalState) { 54 this.navigationalState = navigationalState; 55 } 56 57 public String getWindowState() { 58 return windowState; 59 } 60 61 public void setWindowState(String windowState) { 62 this.windowState = windowState; 63 } 64 65 public String getMode() { 66 return mode; 67 } 68 69 public void setMode(String mode) { 70 this.mode = mode; 71 } 72 73 public ClientData getClientData() { 74 return clientData; 75 } 76 77 public void setClientData(ClientData clientData) { 78 this.clientData = clientData; 79 } 80 81 public String [] getLocales() { 82 return locales; 83 } 84 85 public void setLocales(String [] locales) { 86 this.locales = locales; 87 } 88 89 public String [] getModes() { 90 return modes; 91 } 92 93 public void setModes(String [] modes) { 94 this.modes = modes; 95 } 96 97 public String [] getWindowStates() { 98 return windowStates; 99 } 100 101 public void setWindowStates(String [] windowStates) { 102 this.windowStates = windowStates; 103 } 104 105 public String [] getMimeTypes() { 106 return mimeTypes; 107 } 108 109 public void setMimeTypes(String [] mimeTypes) { 110 this.mimeTypes = mimeTypes; 111 } 112 113 public String [] getCharacterEncodingSet() { 114 return characterEncodingSet; 115 } 116 117 public void setCharacterEncodingSet(String [] characterEncodingSet) { 118 this.characterEncodingSet = characterEncodingSet; 119 } 120 121 public String getUserAuthentication() { 122 return userAuthentication; 123 } 124 125 public void setUserAuthentication(String userAuthentication) { 126 this.userAuthentication = userAuthentication; 127 } 128 129 public boolean isModeSupported(String wsrpMode) { 130 if (wsrpMode == null) { 131 throw new IllegalArgumentException ("mode must not be null"); 132 } 133 String [] mods = getModes(); 134 for (int i = 0; i < mods.length; i++) { 135 if (wsrpMode.equalsIgnoreCase(mods[i])) { 136 return true; 137 } 138 } 139 return false; 140 } 141 142 public boolean isWindowStateSupported(String wsrpWindowState) { 143 if (wsrpWindowState == null) { 144 throw new IllegalArgumentException ("window state must not be null"); 145 } 146 String [] stats = getWindowStates(); 147 for (int i = 0; i < stats.length; i++) { 148 if (wsrpWindowState.equalsIgnoreCase(stats[i])) { 149 return true; 150 } 151 } 152 return false; 153 } 154 155 156 157 } | Popular Tags |