001/* 002 * (C) Copyright 2010 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * Contributors: 016 * Nuxeo - initial API and implementation 017 */ 018 019package org.nuxeo.ecm.platform.shibboleth.web.service; 020 021import org.nuxeo.runtime.model.ComponentInstance; 022import org.nuxeo.runtime.model.DefaultComponent; 023 024/** 025 * Shibboleth Group service component implementation 026 * 027 * @author <a href="mailto:[email protected]">Arnaud Kervern</a> 028 */ 029public class ShibbolethGroupsServiceImpl extends DefaultComponent implements ShibbolethGroupsService { 030 031 public static final String CONFIG_EP = "config"; 032 033 protected ShibbolethGroupsConfig config; 034 035 @Override 036 public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) { 037 if (CONFIG_EP.equals(extensionPoint)) { 038 config = (ShibbolethGroupsConfig) contribution; 039 } 040 } 041 042 @Override 043 public String getParseString() { 044 return config == null ? null : config.getParseString(); 045 } 046 047 @Override 048 public String getShibbGroupBasePath() { 049 return config == null ? null : config.getShibbGroupBasePath(); 050 } 051}