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>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.