gluu
公開メンバ関数 | 静的非公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.gluu.oxtrust.service.scim2.interceptor.ReferenceURIInterceptor クラス
org.gluu.oxtrust.service.scim2.interceptor.ReferenceURIInterceptor 連携図
Collaboration graph

公開メンバ関数

Object manage (InvocationContext ctx) throws Exception
 

静的非公開メンバ関数

static String dropDollar (Object param)
 

非公開変数類

Logger log
 

詳解

This class checks if filter, attributes or excludedAttributes query param contains resource references ($ref) and if so drops the dollar sign of occurrences. This is required for introspection utilities to make their work more accurately.

関数詳解

◆ dropDollar()

static String org.gluu.oxtrust.service.scim2.interceptor.ReferenceURIInterceptor.dropDollar ( Object  param)
inlinestaticprivate
74  {
75  return (param!=null && param instanceof String) ? param.toString().replaceAll("\\$ref", "ref") : null;
76  }

◆ manage()

Object org.gluu.oxtrust.service.scim2.interceptor.ReferenceURIInterceptor.manage ( InvocationContext  ctx) throws Exception
inline
42  {
43 
44  Object[] params=ctx.getParameters();
45  Annotation[][] annotations=ctx.getMethod().getParameterAnnotations();
46 
47  for (int i = 0; i<annotations.length; i++){
48  //Iterate over annotations found at every parameter
49  for (Annotation annotation : annotations[i]) {
50  if (annotation instanceof QueryParam) {
51  String paramName=((QueryParam)annotation).value();
52 
53  if ((paramName.equals(QUERY_PARAM_FILTER) || paramName.equals(QUERY_PARAM_ATTRIBUTES) ||
54  paramName.equals(QUERY_PARAM_EXCLUDED_ATTRS))){
55  log.trace("Removing '$' char (if any) from {} param", paramName);
56  params[i]=dropDollar(params[i]);
57  }
58  }
59  }
60  if (params[i]!=null && params[i] instanceof SearchRequest){
61  log.trace("Removing '$' char (if any) from SearchRequest object");
62  SearchRequest sr=(SearchRequest) params[i];
63  sr.setAttributes(dropDollar(sr.getAttributesStr()));
64  sr.setExcludedAttributes(dropDollar(sr.getExcludedAttributesStr()));
65  sr.setFilter(dropDollar(sr.getFilter()));
66  }
67  }
68  log.debug("ReferenceURIInterceptor. manage exit");
69 
70  return ctx.proceed();
71 
72  }
Logger log
Definition: ReferenceURIInterceptor.java:39
static String dropDollar(Object param)
Definition: ReferenceURIInterceptor.java:74

メンバ詳解

◆ log

Logger org.gluu.oxtrust.service.scim2.interceptor.ReferenceURIInterceptor.log
private

このクラス詳解は次のファイルから抽出されました: