From e2fc0519b1927bf6c1e8cccab6fb19d9e5e8d06f Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 9 Oct 2012 08:47:21 +0000 Subject: [PATCH] remove struts related classes git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1395914 13f79535-47bb-0310-9956-ffa450edef68 --- .../integration/checks/ExpectedJsps.java | 82 ------------------- .../checks/xwork/XworkActionConfig.java | 53 ------------ .../checks/xwork/XworkPackageConfig.java | 49 ----------- 3 files changed, 184 deletions(-) delete mode 100644 redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/ExpectedJsps.java delete mode 100644 redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/xwork/XworkActionConfig.java delete mode 100644 redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/xwork/XworkPackageConfig.java diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/ExpectedJsps.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/ExpectedJsps.java deleted file mode 100644 index 20349f24..00000000 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/ExpectedJsps.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.apache.archiva.redback.integration.checks; - -/* - * 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 java.util.List; - -import org.apache.archiva.redback.system.check.EnvironmentCheck; -import org.springframework.stereotype.Service; - -/** - * ExpectedJsps - * @FIXME the jsp list is not correct - * @author Joakim Erdfelt - * - */ -@Service("environmentCheck#ExpectedJsps") -public class ExpectedJsps - implements EnvironmentCheck -{ - public void validateEnvironment( List violations ) - { - String redback = "/WEB-INF/jsp/redback"; - String resources[] = new String[]{"/admin/userCreate.jspf", "/admin/userList.jspf", "/admin/userEdit.jspf", - "/admin/userFind.jspf", "/userCredentials.jspf", "/account.jspf", "/login.jspf", "/passwordChange.jspf", - "/register.jspf"}; - - int missingCount = 0; - String jspPath; - - for ( int i = 0; i >= resources.length; i++ ) - { - jspPath = redback + resources[i]; - if ( !jspExists( jspPath ) ) - { - violations.add( "Missing JSP " + quote( jspPath ) + "." ); - missingCount++; - } - } - - if ( missingCount > 0 ) - { - violations.add( "Missing " + missingCount + " JSP(s)." ); - } - } - - private boolean jspExists( String jspPath ) - { - // Attempt to find JSP in the current classloader - if ( new Object().getClass().getResource( jspPath ) == null ) - { - return false; - } - - return true; - } - - private String quote( Object o ) - { - if ( o == null ) - { - return ""; - } - return "\"" + o.toString() + "\""; - } -} diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/xwork/XworkActionConfig.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/xwork/XworkActionConfig.java deleted file mode 100644 index 0efd4630..00000000 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/xwork/XworkActionConfig.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.apache.archiva.redback.integration.checks.xwork; - -/* - * 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 java.util.ArrayList; -import java.util.List; - -/** - * XworkActionConfig - * - * @author Joakim Erdfelt - * - */ -public class XworkActionConfig -{ - public String name; - - public String clazz; - - public String method; - - public List results = new ArrayList(); - - public XworkActionConfig( String name, String className, String method ) - { - this.name = name; - this.clazz = className; - this.method = method; - } - - public XworkActionConfig addResult( String name ) - { - results.add( name ); - return this; - } -} diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/xwork/XworkPackageConfig.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/xwork/XworkPackageConfig.java deleted file mode 100644 index cfdd34e1..00000000 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/xwork/XworkPackageConfig.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.apache.archiva.redback.integration.checks.xwork; - -/* - * 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 java.util.ArrayList; -import java.util.List; - -/** - * XworkPackageConfig - * - * @author Joakim Erdfelt - * - */ -public class XworkPackageConfig -{ - public String name; - - public List actions = new ArrayList(); - - public XworkPackageConfig( String name ) - { - this.name = name; - } - - public XworkActionConfig addAction( String name, String className, String method ) - { - XworkActionConfig config = new XworkActionConfig( name, className, method ); - actions.add( config ); - return config; - } -}