001/* 002 * (C) Copyright 2010 Nuxeo SAS (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * Contributors: 014 * Nuxeo - initial API and implementation 015 */ 016 017package org.nuxeo.ecm.platform.shibboleth.web.service; 018 019import org.nuxeo.runtime.model.ComponentInstance; 020import org.nuxeo.runtime.model.DefaultComponent; 021 022/** 023 * Shibboleth Group service component implementation 024 * 025 * @author <a href="mailto:akervern@nuxeo.com">Arnaud Kervern</a> 026 */ 027public class ShibbolethGroupsServiceImpl extends DefaultComponent implements ShibbolethGroupsService { 028 029 public static final String CONFIG_EP = "config"; 030 031 protected ShibbolethGroupsConfig config; 032 033 @Override 034 public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) { 035 if (CONFIG_EP.equals(extensionPoint)) { 036 config = (ShibbolethGroupsConfig) contribution; 037 } 038 } 039 040 @Override 041 public String getParseString() { 042 return config == null ? null : config.getParseString(); 043 } 044 045 @Override 046 public String getShibbGroupBasePath() { 047 return config == null ? null : config.getShibbGroupBasePath(); 048 } 049}