Delete unused test entities.
This commit is contained in:
parent
ead669f10c
commit
244047ffe9
|
@ -1,51 +0,0 @@
|
|||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed 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.springframework.security.access.annotation.test;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
/**
|
||||
* An entity used in our generics testing.
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
public class Entity {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
String info;
|
||||
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
public Entity(String info) {
|
||||
Assert.hasText(info, "Some information must be given!");
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
void makeLowercase() {
|
||||
this.info = info.toLowerCase();
|
||||
}
|
||||
|
||||
void makeUppercase() {
|
||||
this.info = info.toUpperCase();
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed 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.springframework.security.access.annotation.test;
|
||||
|
||||
/**
|
||||
* An extended version of <code>Entity</code>.
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
public class Organisation extends Entity {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
private boolean active = true;
|
||||
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
public Organisation(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
void deactive() {
|
||||
this.active = true;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return this.active;
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed 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.springframework.security.access.annotation.test;
|
||||
|
||||
/**
|
||||
* DOCUMENT ME!
|
||||
*
|
||||
*/
|
||||
public interface OrganisationService extends Service<Organisation> {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public void deactive(Organisation org);
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed 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.springframework.security.access.annotation.test;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class OrganisationServiceImpl extends ServiceImpl<Organisation> implements OrganisationService {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public void deactive(Organisation org) {
|
||||
org.deactive();
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed 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.springframework.security.access.annotation.test;
|
||||
|
||||
/**
|
||||
* An extended version of <code>Entity</code>.
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
public class Person extends Entity {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
private boolean active = true;
|
||||
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
public Person(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
void deactive() {
|
||||
this.active = true;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return this.active;
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed 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.springframework.security.access.annotation.test;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface PersonService extends Service<Person> {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public void deactive(Person person);
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed 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.springframework.security.access.annotation.test;
|
||||
|
||||
/**
|
||||
* DOCUMENT ME!
|
||||
*
|
||||
*/
|
||||
public class PersonServiceImpl extends ServiceImpl<Person> implements PersonService {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public void deactive(Person person) {
|
||||
person.deactive();
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed 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.springframework.security.access.annotation.test;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
||||
/**
|
||||
* An interface that uses Java 5 generics.
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
public interface Service<E extends Entity> {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public int countElements(Collection<E> ids);
|
||||
|
||||
public void makeLowerCase(E input);
|
||||
|
||||
public void makeUpperCase(E input);
|
||||
|
||||
public void publicMakeLowerCase(E input);
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed 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.springframework.security.access.annotation.test;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class ServiceImpl<E extends Entity> implements Service<E> {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public int countElements(Collection<E> ids) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void makeLowerCase(E input) {
|
||||
input.makeLowercase();
|
||||
}
|
||||
|
||||
public void makeUpperCase(E input) {
|
||||
input.makeUppercase();
|
||||
}
|
||||
|
||||
public void publicMakeLowerCase(E input) {
|
||||
input.makeUppercase();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue