]> source.dussan.org Git - archiva.git/commitdiff
taglib not anymore needed
authorOlivier Lamy <olamy@apache.org>
Tue, 9 Oct 2012 08:15:41 +0000 (08:15 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 9 Oct 2012 08:15:41 +0000 (08:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1395902 13f79535-47bb-0310-9956-ffa450edef68

redback-integrations/redback-common-integrations/pom.xml
redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/ElseAuthorizedTag.java [deleted file]
redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IfAnyAuthorizedTag.java [deleted file]
redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IfAuthorizedTag.java [deleted file]
redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IfConfiguredTag.java [deleted file]
redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IsNotReadOnlyUserManagerTag.java [deleted file]
redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IsReadOnlyUserManagerTag.java [deleted file]

index 5a6fc919c966b21d3b6e986fed5da78bcb4b79f6..0ca69f03000d5514b188f3c7d4587ac3e283e81a 100644 (file)
       <artifactId>jsr250-api</artifactId>
     </dependency>      
 
-    <dependency>
-      <groupId>commons-beanutils</groupId>
-      <artifactId>commons-beanutils-bean-collections</artifactId>
-      <version>1.7.0</version>
-      <!-- Needed by extremecomponents -->
-    </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
       <artifactId>servlet-api</artifactId>
       <scope>provided</scope>
     </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>jsp-api</artifactId>
-      <scope>provided</scope>
-    </dependency>        
-    <dependency>
-      <groupId>taglibs</groupId>
-      <artifactId>standard</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>jstl</artifactId>
-    </dependency>
+
     <dependency>
       <groupId>commons-collections</groupId>
       <artifactId>commons-collections</artifactId>
diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/ElseAuthorizedTag.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/ElseAuthorizedTag.java
deleted file mode 100644 (file)
index 656448b..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.apache.archiva.redback.integration.taglib.jsp;
-
-/*
- * 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.
- */
-
-import javax.servlet.jsp.JspTagException;
-import javax.servlet.jsp.jstl.core.ConditionalTagSupport;
-
-/**
- * IfAuthorizedTag:
- *
- * @author Jesse McConnell <jesse@codehaus.org>
- *
- */
-public class ElseAuthorizedTag
-    extends ConditionalTagSupport
-{
-    protected boolean condition()
-        throws JspTagException
-    {
-        Boolean authzStatus = (Boolean) pageContext.getAttribute( "ifAuthorizedTag" );
-
-        if ( authzStatus != null )
-        {
-            pageContext.removeAttribute( "ifAuthorizedTag" );
-
-            return !authzStatus.booleanValue();
-        }
-
-        authzStatus = (Boolean) pageContext.getAttribute( "ifAnyAuthorizedTag" );
-
-        if ( authzStatus != null )
-        {
-            pageContext.removeAttribute( "ifAnyAuthorizedTag" );
-
-            return !authzStatus.booleanValue();
-        }
-
-        throw new JspTagException( "ElseAuthorizedTag should follow either IfAuthorized or IfAnyAuthorized" );
-    }
-}
diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IfAnyAuthorizedTag.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IfAnyAuthorizedTag.java
deleted file mode 100644 (file)
index a6df0a8..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.apache.archiva.redback.integration.taglib.jsp;
-
-/*
- * 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.
- */
-
-import org.apache.archiva.redback.authorization.AuthorizationException;
-import org.apache.archiva.redback.system.SecuritySession;
-import org.apache.archiva.redback.system.SecuritySystem;
-import org.apache.archiva.redback.system.SecuritySystemConstants;
-import org.springframework.context.ApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-import javax.servlet.jsp.JspTagException;
-import javax.servlet.jsp.jstl.core.ConditionalTagSupport;
-import java.util.StringTokenizer;
-
-/**
- * IfAnyAuthorizedTag:
- *
- * @author Jesse McConnell <jesse@codehaus.org>
- *
- */
-public class IfAnyAuthorizedTag
-    extends ConditionalTagSupport
-{
-    /**
-     * comma delimited list of permissions to check
-     */
-    private String permissions;
-
-    private String resource;
-
-    public void setPermissions( String permissions )
-    {
-        this.permissions = permissions;
-    }
-
-    public void setResource( String resource )
-    {
-        this.resource = resource;
-    }
-
-    protected boolean condition()
-        throws JspTagException
-    {
-        ApplicationContext applicationContext =
-            WebApplicationContextUtils.getRequiredWebApplicationContext( pageContext.getServletContext() );
-
-        SecuritySession securitySession =
-            (SecuritySession) pageContext.getSession().getAttribute( SecuritySystemConstants.SECURITY_SESSION_KEY );
-
-        try
-        {
-            final SecuritySystem securitySystem = applicationContext.getBean( "securitySystem", SecuritySystem.class );
-            if ( securitySystem == null )
-            {
-                throw new JspTagException( "unable to locate the security system" );
-            }
-
-            StringTokenizer strtok = new StringTokenizer( permissions, "," );
-
-            while ( strtok.hasMoreTokens() )
-            {
-                String permission = strtok.nextToken().trim();
-
-                if ( securitySystem.isAuthorized( securitySession, permission, resource ) )
-                {
-                    return true;
-                }
-            }
-        }
-        catch ( AuthorizationException ae )
-        {
-            throw new JspTagException( "error with authorization", ae );
-        }
-
-        return false;
-    }
-}
diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IfAuthorizedTag.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IfAuthorizedTag.java
deleted file mode 100644 (file)
index 5c8a78f..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.apache.archiva.redback.integration.taglib.jsp;
-
-/*
- * 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.
- */
-
-import org.apache.archiva.redback.authorization.AuthorizationException;
-import org.apache.archiva.redback.system.SecuritySession;
-import org.apache.archiva.redback.system.SecuritySystem;
-import org.apache.archiva.redback.system.SecuritySystemConstants;
-import org.springframework.context.ApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-import javax.servlet.jsp.JspTagException;
-import javax.servlet.jsp.jstl.core.ConditionalTagSupport;
-
-/**
- * IfAuthorizedTag:
- *
- * @author Jesse McConnell <jesse@codehaus.org>
- *
- */
-public class IfAuthorizedTag
-    extends ConditionalTagSupport
-{
-    private String permission;
-
-    private String resource;
-
-    public void setPermission( String permission )
-    {
-        this.permission = permission;
-    }
-
-    public void setResource( String resource )
-    {
-        this.resource = resource;
-    }
-
-    protected boolean condition()
-        throws JspTagException
-    {
-        ApplicationContext applicationContext =
-            WebApplicationContextUtils.getRequiredWebApplicationContext( pageContext.getServletContext() );
-
-        Boolean authzStatusBool = (Boolean) pageContext.getAttribute( "redbackCache" + permission + resource );
-        boolean authzStatus;
-
-        //long execTime = System.currentTimeMillis();
-
-        if ( authzStatusBool == null )
-        {
-            SecuritySession securitySession =
-                (SecuritySession) pageContext.getSession().getAttribute( SecuritySystemConstants.SECURITY_SESSION_KEY );
-
-            try
-            {
-                SecuritySystem securitySystem = applicationContext.getBean( "securitySystem", SecuritySystem.class );
-                if ( securitySystem == null )
-                {
-                    throw new JspTagException( "unable to locate security system" );
-                }
-
-                authzStatus = securitySystem.isAuthorized( securitySession, permission, resource );
-                pageContext.setAttribute( "redbackCache" + permission + resource, Boolean.valueOf( authzStatus ) );
-            }
-            catch ( AuthorizationException ae )
-            {
-                throw new JspTagException( "error with authorization", ae );
-            }
-
-            //System.out.println( "[PERF] " + "redbackCache" + permission + resource + " Time: " + (System.currentTimeMillis() - execTime) ); 
-        }
-        else
-        {
-            authzStatus = authzStatusBool.booleanValue();
-            //System.out.println( "[PERF][Cached] " + "redbackCache" + permission + resource + " Time: " + (System.currentTimeMillis() - execTime) ); 
-        }
-
-        pageContext.setAttribute( "ifAuthorizedTag", Boolean.valueOf( authzStatus ) );
-        return authzStatus;
-    }
-}
diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IfConfiguredTag.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IfConfiguredTag.java
deleted file mode 100644 (file)
index fd9e52a..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.apache.archiva.redback.integration.taglib.jsp;
-
-/*
- * 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.
- */
-
-import org.apache.archiva.redback.configuration.UserConfiguration;
-import org.springframework.context.ApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-import javax.servlet.jsp.JspTagException;
-import javax.servlet.jsp.jstl.core.ConditionalTagSupport;
-
-/**
- * IfConfiguredTag:
- *
- * @author Jesse McConnell <jesse@codehaus.org>
- *
- */
-public class IfConfiguredTag
-    extends ConditionalTagSupport
-{
-    private String option;
-
-    private String value;
-
-    public void setOption( String option )
-    {
-        this.option = option;
-    }
-
-    public void setValue( String value )
-    {
-        this.value = value;
-    }
-
-    protected boolean condition()
-        throws JspTagException
-    {
-        ApplicationContext applicationContext =
-            WebApplicationContextUtils.getRequiredWebApplicationContext( pageContext.getServletContext() );
-
-        UserConfiguration config = applicationContext.getBean( "userConfiguration", UserConfiguration.class );
-
-        if ( value != null )
-        {
-            String configValue = config.getString( option );
-
-            if ( value.equals( configValue ) )
-            {
-                return true;
-            }
-            else
-            {
-                return false;
-            }
-        }
-        else
-        {
-            return config.getBoolean( option );
-        }
-    }
-}
diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IsNotReadOnlyUserManagerTag.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IsNotReadOnlyUserManagerTag.java
deleted file mode 100644 (file)
index 4002fa7..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.archiva.redback.integration.taglib.jsp;
-
-/*
- * 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.
- */
-
-import org.apache.archiva.redback.users.UserManager;
-import org.springframework.context.ApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-import javax.servlet.jsp.JspTagException;
-import javax.servlet.jsp.jstl.core.ConditionalTagSupport;
-
-/**
- * IsReadOnlyUserManagerTag:
- *
- * @author Jesse McConnell <jesse@codehaus.org>
- *
- */
-public class IsNotReadOnlyUserManagerTag
-    extends ConditionalTagSupport
-{
-    protected boolean condition()
-        throws JspTagException
-    { 
-        ApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(pageContext.getServletContext());
-
-        UserManager config = applicationContext.getBean(  "userManager#configurable" , UserManager.class );
-        if (config == null)
-        {
-            throw new JspTagException( "unable to locate security system" );
-        }
-
-        return !config.isReadOnly();
-    }
-}
diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IsReadOnlyUserManagerTag.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/taglib/jsp/IsReadOnlyUserManagerTag.java
deleted file mode 100644 (file)
index 09dfb73..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.archiva.redback.integration.taglib.jsp;
-
-/*
- * 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.
- */
-
-import org.apache.archiva.redback.users.UserManager;
-import org.springframework.context.ApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-import javax.servlet.jsp.JspTagException;
-import javax.servlet.jsp.jstl.core.ConditionalTagSupport;
-
-/**
- * IsReadOnlyUserManagerTag:
- *
- * @author Jesse McConnell <jesse@codehaus.org>
- *
- */
-public class IsReadOnlyUserManagerTag
-    extends ConditionalTagSupport
-{
-    protected boolean condition()
-        throws JspTagException
-    {
-        ApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(pageContext.getServletContext());
-        UserManager config = applicationContext.getBean(  "userManager#configurable" , UserManager.class );
-        if (config == null)
-        {
-            throw new JspTagException( "unable to locate security system" );
-        }
-
-        return config.isReadOnly();
-    }
-}