Update of /cvsroot/openamf/openamf/src/java/org/openamf
In directory sc8-pr-cvs1:/tmp/cvs-serv30001/src/java/org/openamf
Modified Files:
AdvancedGateway.java
Log Message:
more cleanup
Index: AdvancedGateway.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/AdvancedGateway.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** AdvancedGateway.java 25 May 2003 00:08:30 -0000 1.13
--- AdvancedGateway.java 25 May 2003 00:16:18 -0000 1.14
***************
*** 48,72 ****
if (methodConfig == null) {
StringBuffer paramTypes = new StringBuffer("(");
! for (Iterator i = request.getParameters().iterator(); i.hasNext();) {
String type = i.next().getClass().getName();
paramTypes.append(type);
! if (i.hasNext()) {paramTypes.append(", "); }
}
paramTypes.append(")");
! throw new NoSuchMethodException(request.getServiceMethodName()
! + paramTypes.toString());
}
!
// store methodConfig for later use
request.setServiceMethodConfig(methodConfig);
// Check access permissions if there are any in the configuration
! Iterator constraints =
! methodConfig.getAccessConstraintConfigs();
if (constraints.hasNext()) {
boolean accessDenied = true;
while (accessDenied && constraints.hasNext()) {
ServiceMethodAccessConstraintConfig constraint =
! (ServiceMethodAccessConstraintConfig)constraints.next();
accessDenied =
!httpServletRequest.isUserInRole(
--- 48,76 ----
if (methodConfig == null) {
StringBuffer paramTypes = new StringBuffer("(");
! for (Iterator i = request.getParameters().iterator();
! i.hasNext();
! ) {
String type = i.next().getClass().getName();
paramTypes.append(type);
! if (i.hasNext()) {
! paramTypes.append(", ");
! }
}
paramTypes.append(")");
! throw new NoSuchMethodException(
! request.getServiceMethodName() + paramTypes.toString());
}
!
// store methodConfig for later use
request.setServiceMethodConfig(methodConfig);
// Check access permissions if there are any in the configuration
! Iterator constraints = methodConfig.getAccessConstraintConfigs();
if (constraints.hasNext()) {
boolean accessDenied = true;
while (accessDenied && constraints.hasNext()) {
ServiceMethodAccessConstraintConfig constraint =
! (ServiceMethodAccessConstraintConfig) constraints
! .next();
accessDenied =
!httpServletRequest.isUserInRole(
***************
*** 74,85 ****
}
if (accessDenied) {
! Principal user = httpServletRequest.getUserPrincipal();
throw new AccessDeniedException(
! (user==null?"<anonymous user>":user.getName()));
}
}
!
addStateBeansToParams(httpServletRequest, request, methodConfig);
!
serviceInvoker =
ServiceInvoker.load(
--- 78,89 ----
}
if (accessDenied) {
! Principal user = httpServletRequest.getUserPrincipal();
throw new AccessDeniedException(
! (user == null ? "<anonymous user>" : user.getName()));
}
}
!
addStateBeansToParams(httpServletRequest, request, methodConfig);
!
serviceInvoker =
ServiceInvoker.load(
***************
*** 207,215 ****
FilterException {
! log.debug(
! "loading filter class: " + filterConfig.getClassName());
Class filterClass =
Thread.currentThread().getContextClassLoader().loadClass(
! filterConfig.getClassName());
ResultFilter resultFilter = (ResultFilter) filterClass.newInstance();
--- 211,218 ----
FilterException {
! log.debug("loading filter class: " + filterConfig.getClassName());
Class filterClass =
Thread.currentThread().getContextClassLoader().loadClass(
! filterConfig.getClassName());
ResultFilter resultFilter = (ResultFilter) filterClass.newInstance();
***************
*** 236,241 ****
throws IOException, SAXException, ClassNotFoundException {
! log.debug("getting OperationConfig");
! log.debug("looking for " + request.getServiceMethodName());
ServiceMethodConfig methodConfig = null;
--- 239,243 ----
throws IOException, SAXException, ClassNotFoundException {
! log.debug("getting MethodConfig for " + request.getServiceMethodName());
ServiceMethodConfig methodConfig = null;
***************
*** 250,257 ****
String smcName = smc.getName();
log.debug("soc name: " + smcName);
! if ("*".equals(smcName)
! || smcName.equals(request.getServiceMethodName())) {
log.debug("name matches, now to compare params");
- //compare params
int paramIndex = -1;
Iterator sopcs = smc.getParameterConfigs();
--- 252,258 ----
String smcName = smc.getName();
log.debug("soc name: " + smcName);
! if ("*".equals(smcName)
! || smcName.equals(request.getServiceMethodName())) {
log.debug("name matches, now to compare params");
int paramIndex = -1;
Iterator sopcs = smc.getParameterConfigs();
***************
*** 268,272 ****
sopc.getType().equals("?")
|| typesMatch(parameters, paramIndex, sopc)) {
! if (paramIndex == parameters.size()-1) {
log.debug("all parameters match");
methodConfig = smc;
--- 269,273 ----
sopc.getType().equals("?")
|| typesMatch(parameters, paramIndex, sopc)) {
! if (paramIndex == parameters.size() - 1) {
log.debug("all parameters match");
methodConfig = smc;
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.