You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/11/05 18:38:37 UTC
svn commit: r592099 - in /lenya/branches/branch_1_2_x_shibboleth/src:
java/org/apache/lenya/ac/saml/impl/SamlAttributeDefinition.java
java/org/apache/lenya/ac/shibboleth/ShibbolethAttributeDefinition.java
webapp/WEB-INF/cocoon-xconf.xsl
Author: andreas
Date: Mon Nov 5 09:38:28 2007
New Revision: 592099
URL: http://svn.apache.org/viewvc?rev=592099&view=rev
Log:
Refactoring: moved AttributeDefinition implementation from shibboleth to saml package
Added:
lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/saml/impl/SamlAttributeDefinition.java
Removed:
lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/shibboleth/ShibbolethAttributeDefinition.java
Modified:
lenya/branches/branch_1_2_x_shibboleth/src/webapp/WEB-INF/cocoon-xconf.xsl
Added: lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/saml/impl/SamlAttributeDefinition.java
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/saml/impl/SamlAttributeDefinition.java?rev=592099&view=auto
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/saml/impl/SamlAttributeDefinition.java (added)
+++ lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/saml/impl/SamlAttributeDefinition.java Mon Nov 5 09:38:28 2007
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.lenya.ac.saml.impl;
+
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.Serviceable;
+import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.lenya.ac.AttributeDefinition;
+import org.apache.lenya.ac.saml.AttributeTranslator;
+
+/**
+ * Shibboleth-based attribute definition. The attribute names are the possible
+ * result names of the Shibboleth attribute translator.
+ */
+public class SamlAttributeDefinition extends AbstractLogEnabled implements
+ AttributeDefinition, Serviceable, ThreadSafe {
+
+ private AttributeTranslator translator;
+ private ServiceManager manager;
+
+ public String[] getAttributeNames() {
+ if (this.translator == null) {
+ try {
+ this.translator = (AttributeTranslator) this.manager
+ .lookup(AttributeTranslator.ROLE);
+ } catch (ServiceException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ return this.translator.getSupportedResultNames();
+ }
+
+ public void service(ServiceManager manager) throws ServiceException {
+ this.manager = manager;
+ }
+
+}
Modified: lenya/branches/branch_1_2_x_shibboleth/src/webapp/WEB-INF/cocoon-xconf.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/webapp/WEB-INF/cocoon-xconf.xsl?rev=592099&r1=592098&r2=592099&view=diff
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/webapp/WEB-INF/cocoon-xconf.xsl (original)
+++ lenya/branches/branch_1_2_x_shibboleth/src/webapp/WEB-INF/cocoon-xconf.xsl Mon Nov 5 09:38:28 2007
@@ -412,7 +412,7 @@
<component logger="lenya.ac.shibboleth"
role="org.apache.lenya.ac.AttributeDefinition"
- class="org.apache.lenya.ac.shibboleth.ShibbolethAttributeDefinition"/>
+ class="org.apache.lenya.ac.saml.impl.SamlAttributeDefinition"/>
</xsl:copy>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org