Changeset 2511
- Timestamp:
- 10/09/08 11:48:38 (3 months ago)
- Location:
- trunk/otis
- Files:
-
- 4 modified
-
samples/HelloWorld.java (modified) (4 diffs)
-
src/org/bandit/otis/impl/IEndPoint.java (modified) (1 diff)
-
src/org/bandit/otis/impl/RemoteAuthSession.java (modified) (2 diffs)
-
src/org/bandit/otis/impl/RemoteEndPointClient.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/otis/samples/HelloWorld.java
r2509 r2511 5 5 import org.bandit.otis.api.IAuthSession; 6 6 import org.bandit.otis.impl.AuthSessionManager; 7 import org.bandit.otis.utils.Constants; 7 8 import org.eclipse.higgins.configuration.xml.ConfigurationHandler; 8 9 import org.eclipse.higgins.idas.api.IAttribute; … … 23 24 protected IAuthSession service; 24 25 25 public HelloWorld() throws Exception 26 public HelloWorld( 27 String[] args) throws Exception 26 28 { 27 29 String settingFileName = "otis-config.client.remote.xml"; … … 36 38 System.out.println("failed to get config of: settingFileDir" + settingFileName); 37 39 } 38 40 39 41 manager = new AuthSessionManager(settings); 40 42 service = manager.getAuthSession(); 43 44 if (args.length > 0) 45 { 46 System.out.println("Resetting endpoint to " + args[0]); 47 service.setComponentSetting(Constants.OTIS_ENDPOINT_SETTING, args[0]); 48 } 49 41 50 } 42 51 … … 49 58 try 50 59 { 51 HelloWorld hw = new HelloWorld( );60 HelloWorld hw = new HelloWorld(args); 52 61 53 62 hw.loginAsAnon(); -
trunk/otis/src/org/bandit/otis/impl/IEndPoint.java
r2471 r2511 54 54 public void throwError( 55 55 IEndPointResponse response) throws AuthSessionException; 56 57 public void setEndpoint( 58 String endpointURI); 56 59 } -
trunk/otis/src/org/bandit/otis/impl/RemoteAuthSession.java
r2497 r2511 42 42 import org.eclipse.higgins.idas.api.ITypedValue; 43 43 import org.eclipse.higgins.idas.api.IdASException; 44 import org.eclipse.higgins.idas.api.UnhandledExtensionException; 44 45 import org.eclipse.higgins.idas.registry.IdASRegistry; 45 46 import org.eclipse.higgins.util.xml.DomFuncs; … … 1130 1131 Object arg1) throws IdASException 1131 1132 { 1132 throw new UnsupportedOperationException();1133 setComponentSetting(arg0, arg1, false); 1133 1134 } 1134 1135 1135 1136 public void setComponentSetting( 1136 String arg0, 1137 Object arg1, 1138 boolean arg2) throws IdASException 1139 { 1140 throw new UnsupportedOperationException(); 1137 String key, 1138 Object val, 1139 boolean bCritical) throws IdASException 1140 { 1141 if (key == Constants.OTIS_ENDPOINT_SETTING) 1142 { 1143 m_endPoint.setEndpoint((String)val); 1144 return; 1145 } 1146 if (bCritical == true) 1147 { 1148 throw new UnhandledExtensionException(); 1149 } 1141 1150 } 1142 1151 -
trunk/otis/src/org/bandit/otis/impl/RemoteEndPointClient.java
r2471 r2511 392 392 } /* end private class RemoteEndPointClientResponse */ 393 393 394 public void setEndpoint( 395 String endpointURI) 396 { 397 m_endPoint = endpointURI; 398 m_settings.put(Constants.OTIS_ENDPOINT_SETTING, endpointURI); 399 } 400 394 401 }