@Override public void init(FilterConfig filterConfig) throws PortletException { this.filterConfig = filterConfig; String accessTokenValidation = filterConfig.getInitParameter(INIT_PARAM_ACCESS_TOKEN_VALIDATION); if (AccessTokenValidation.ALWAYS.name().equals(accessTokenValidation)) { this.accessTokenValidation = AccessTokenValidation.ALWAYS; } else if (AccessTokenValidation.SKIP.name().equals(accessTokenValidation)) { this.accessTokenValidation = AccessTokenValidation.SKIP; } else { // SESSION is default validation type this.accessTokenValidation = AccessTokenValidation.SESSION; } this.oauthProviderKey = filterConfig.getInitParameter(INIT_PARAM_OAUTH_PROVIDER_KEY); if (oauthProviderKey == null) { throw new PortletException("Init parameter '" + INIT_PARAM_OAUTH_PROVIDER_KEY + "' needs to be provided"); } }
/** * Stores the FilterConfig instance to be retrieved with getFilterConfig() */ public void init(FilterConfig filterConfig) throws PortletException { LOG.debug("Initializing " + filterConfig.getFilterName() + "(" + getClass() + ")"); this.filterConfig = filterConfig; this.init(); }
public void init(FilterConfig config) throws PortletException { String portletNameAction = (String) config.getPortletContext().getAttribute("PortletNameAction"); String filterName = config.getFilterName(); /* TestCase: V2AddlFilterTests_SPEC2_20_Action_filter10 */ /* Details: "For multiple filter declarations for a single filter */ /* class, the filter instance must receive all initialization */ /* parameters defined in the filter declaration" */ if (portletNameAction != null && portletNameAction.equals("AddlFilterTests_SPEC2_20_Action") && filterName.equals("AddlFilterTests_SPEC2_20_Filter1a")) { Enumeration<String> initParams = config.getInitParameterNames(); if (initParams.nextElement().equals("tr4") && initParams.nextElement().equals("tr5")) { AddlFilterTests_SPEC2_20_ActionFilter_TestVariables.actionTr5b_success = true; AddlFilterTests_SPEC2_20_ActionFilter_TestVariables.actionTr6b_success = true; } else { AddlFilterTests_SPEC2_20_ActionFilter_TestVariables.actionTr5b_success = false; AddlFilterTests_SPEC2_20_ActionFilter_TestVariables.actionTr6b_success = false; } } /* TestCase: V2AddlFilterTests_SPEC2_20_Action_filter15 */ /* Details: "The order the container uses in building the chain of */ /* filters to be applied for a particular request is the order in */ /* which the <portlet-name> matching filter mappings appear in */ /* the deployment descriptor" */ if (portletNameAction != null && portletNameAction.equals("AddlFilterTests_SPEC2_20_Action") && filterName.equals("AddlFilterTests_SPEC2_20_Filter1a") && AddlFilterTests_SPEC2_20_ActionFilter_TestVariables.actionTr10a_success) { AddlFilterTests_SPEC2_20_ActionFilter_TestVariables.actionTr10b_success = true; } }
@Override public void init(FilterConfig filterConfig) throws PortletException { }
public void init(FilterConfig filterConfig) throws PortletException { }
/** * Returns the FilterConfig instance. */ public FilterConfig getFilterConfig() { return filterConfig; }
@Override public void init(FilterConfig filterConfig) throws PortletException {}
@Override public void init(FilterConfig filterConfig) throws PortletException { this.filterConfig = filterConfig; }
@Override public void init(FilterConfig filterConfig) throws PortletException { this.filterConfig = filterConfig; initCalled = true; }