gluu
公開メンバ関数 | 限定公開メンバ関数 | 限定公開変数類 | 非公開メンバ関数 | 非公開変数類 | 静的非公開変数類 | 全メンバ一覧
org.xdi.oxauth.service.external.ExternalConsentGatheringService クラス
org.xdi.oxauth.service.external.ExternalConsentGatheringService の継承関係図
Inheritance graph
org.xdi.oxauth.service.external.ExternalConsentGatheringService 連携図
Collaboration graph

公開メンバ関数

 ExternalConsentGatheringService ()
 
CustomScriptConfiguration getScriptByDn (String scriptDn)
 
CustomScriptConfiguration getScriptByInum (String inum)
 
boolean authorize (CustomScriptConfiguration script, int step, ConsentGatheringContext context)
 
int getNextStep (CustomScriptConfiguration script, int step, ConsentGatheringContext context)
 
boolean prepareForStep (CustomScriptConfiguration script, int step, ConsentGatheringContext context)
 
int getStepsCount (CustomScriptConfiguration script, ConsentGatheringContext context)
 
String getPageForStep (CustomScriptConfiguration script, int step, ConsentGatheringContext context)
 

限定公開メンバ関数

void reloadExternal ()
 

限定公開変数類

Map< String, CustomScriptConfiguration > scriptInumMap
 

非公開メンバ関数

Map< String, CustomScriptConfiguration > buildExternalConfigurationsInumMap (List< CustomScriptConfiguration > customScriptConfigurations)
 
ConsentGatheringType consentScript (CustomScriptConfiguration script)
 

非公開変数類

Logger log
 
LookupService lookupService
 

静的非公開変数類

static final long serialVersionUID = 1741073794567832914L
 

詳解

著者
Yuriy Movchan Date: 10/30/2017

構築子と解体子

◆ ExternalConsentGatheringService()

org.xdi.oxauth.service.external.ExternalConsentGatheringService.ExternalConsentGatheringService ( )
inline
39  {
40  super(CustomScriptType.CONSENT_GATHERING);
41  }

関数詳解

◆ authorize()

boolean org.xdi.oxauth.service.external.ExternalConsentGatheringService.authorize ( CustomScriptConfiguration  script,
int  step,
ConsentGatheringContext  context 
)
inline
76  {
77  try {
78  log.debug("Executing python 'authorize' method, script: " + script.getName());
79  boolean result = consentScript(script).authorize(step, context);
80  log.debug("python 'authorize' result: " + result);
81  return result;
82  } catch (Exception ex) {
83  log.error("Failed to execute python 'authorize' method, script: " + script.getName() + ", message: " + ex.getMessage(), ex);
84  saveScriptError(script.getCustomScript(), ex);
85  return false;
86  }
87  }
ConsentGatheringType consentScript(CustomScriptConfiguration script)
Definition: ExternalConsentGatheringService.java:72
Logger log
Definition: ExternalConsentGatheringService.java:32

◆ buildExternalConfigurationsInumMap()

Map<String, CustomScriptConfiguration> org.xdi.oxauth.service.external.ExternalConsentGatheringService.buildExternalConfigurationsInumMap ( List< CustomScriptConfiguration >  customScriptConfigurations)
inlineprivate
48  {
49  Map<String, CustomScriptConfiguration> reloadedExternalConfigurations = new HashMap<String, CustomScriptConfiguration>(customScriptConfigurations.size());
50 
51  for (CustomScriptConfiguration customScriptConfiguration : customScriptConfigurations) {
52  reloadedExternalConfigurations.put(customScriptConfiguration.getInum(), customScriptConfiguration);
53  }
54 
55  return reloadedExternalConfigurations;
56  }

◆ consentScript()

ConsentGatheringType org.xdi.oxauth.service.external.ExternalConsentGatheringService.consentScript ( CustomScriptConfiguration  script)
inlineprivate
72  {
73  return (ConsentGatheringType) script.getExternalType();
74  }

◆ getNextStep()

int org.xdi.oxauth.service.external.ExternalConsentGatheringService.getNextStep ( CustomScriptConfiguration  script,
int  step,
ConsentGatheringContext  context 
)
inline
89  {
90  try {
91  log.debug("Executing python 'getNextStep' method, script: " + script.getName());
92  int result = consentScript(script).getNextStep(step, context);
93  log.debug("python 'getNextStep' result: " + result);
94  return result;
95  } catch (Exception ex) {
96  log.error("Failed to execute python 'getNextStep' method, script: " + script.getName() + ", message: " + ex.getMessage(), ex);
97  saveScriptError(script.getCustomScript(), ex);
98  return -1;
99  }
100  }
ConsentGatheringType consentScript(CustomScriptConfiguration script)
Definition: ExternalConsentGatheringService.java:72
Logger log
Definition: ExternalConsentGatheringService.java:32

◆ getPageForStep()

String org.xdi.oxauth.service.external.ExternalConsentGatheringService.getPageForStep ( CustomScriptConfiguration  script,
int  step,
ConsentGatheringContext  context 
)
inline
128  {
129  try {
130  log.debug("Executing python 'getPageForStep' method, script: " + script.getName());
131  String result = consentScript(script).getPageForStep(step, context);
132  log.debug("python 'getPageForStep' result: " + result);
133  return result;
134  } catch (Exception ex) {
135  log.error("Failed to execute python 'getPageForStep' method, script: " + script.getName() + ", message: " + ex.getMessage(), ex);
136  saveScriptError(script.getCustomScript(), ex);
137  return "";
138  }
139  }
ConsentGatheringType consentScript(CustomScriptConfiguration script)
Definition: ExternalConsentGatheringService.java:72
Logger log
Definition: ExternalConsentGatheringService.java:32

◆ getScriptByDn()

CustomScriptConfiguration org.xdi.oxauth.service.external.ExternalConsentGatheringService.getScriptByDn ( String  scriptDn)
inline
58  {
59  String consentScriptInum = lookupService.getInumFromDn(scriptDn);
60 
61  return getScriptByInum(consentScriptInum);
62  }
CustomScriptConfiguration getScriptByInum(String inum)
Definition: ExternalConsentGatheringService.java:64
LookupService lookupService
Definition: ExternalConsentGatheringService.java:35

◆ getScriptByInum()

CustomScriptConfiguration org.xdi.oxauth.service.external.ExternalConsentGatheringService.getScriptByInum ( String  inum)
inline
64  {
65  if (StringHelper.isEmpty(inum)) {
66  return null;
67  }
68 
69  return this.scriptInumMap.get(inum);
70  }
Map< String, CustomScriptConfiguration > scriptInumMap
Definition: ExternalConsentGatheringService.java:37

◆ getStepsCount()

int org.xdi.oxauth.service.external.ExternalConsentGatheringService.getStepsCount ( CustomScriptConfiguration  script,
ConsentGatheringContext  context 
)
inline
115  {
116  try {
117  log.debug("Executing python 'getStepsCount' method, script: " + script.getName());
118  int result = consentScript(script).getStepsCount(context);
119  log.debug("python 'getStepsCount' result: " + result);
120  return result;
121  } catch (Exception ex) {
122  log.error("Failed to execute python 'getStepsCount' method, script: " + script.getName() + ", message: " + ex.getMessage(), ex);
123  saveScriptError(script.getCustomScript(), ex);
124  return -1;
125  }
126  }
ConsentGatheringType consentScript(CustomScriptConfiguration script)
Definition: ExternalConsentGatheringService.java:72
Logger log
Definition: ExternalConsentGatheringService.java:32

◆ prepareForStep()

boolean org.xdi.oxauth.service.external.ExternalConsentGatheringService.prepareForStep ( CustomScriptConfiguration  script,
int  step,
ConsentGatheringContext  context 
)
inline
102  {
103  try {
104  log.debug("Executing python 'prepareForStep' method, script: " + script.getName());
105  boolean result = consentScript(script).prepareForStep(step, context);
106  log.debug("python 'prepareForStep' result: " + result);
107  return result;
108  } catch (Exception ex) {
109  log.error("Failed to execute python 'prepareForStep' method, script: " + script.getName() + ", message: " + ex.getMessage(), ex);
110  saveScriptError(script.getCustomScript(), ex);
111  return false;
112  }
113  }
ConsentGatheringType consentScript(CustomScriptConfiguration script)
Definition: ExternalConsentGatheringService.java:72
Logger log
Definition: ExternalConsentGatheringService.java:32

◆ reloadExternal()

void org.xdi.oxauth.service.external.ExternalConsentGatheringService.reloadExternal ( )
inlineprotected
44  {
45  this.scriptInumMap = buildExternalConfigurationsInumMap(this.customScriptConfigurations);
46  }
Map< String, CustomScriptConfiguration > buildExternalConfigurationsInumMap(List< CustomScriptConfiguration > customScriptConfigurations)
Definition: ExternalConsentGatheringService.java:48
Map< String, CustomScriptConfiguration > scriptInumMap
Definition: ExternalConsentGatheringService.java:37

メンバ詳解

◆ log

Logger org.xdi.oxauth.service.external.ExternalConsentGatheringService.log
private

◆ lookupService

LookupService org.xdi.oxauth.service.external.ExternalConsentGatheringService.lookupService
private

◆ scriptInumMap

Map<String, CustomScriptConfiguration> org.xdi.oxauth.service.external.ExternalConsentGatheringService.scriptInumMap
protected

◆ serialVersionUID

final long org.xdi.oxauth.service.external.ExternalConsentGatheringService.serialVersionUID = 1741073794567832914L
staticprivate

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