You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by tv...@apache.org on 2007/05/05 08:58:51 UTC
svn commit: r535465 [21/49] - in /jakarta/turbine/fulcrum/trunk: ./ bsf/
bsf/src/java/org/apache/fulcrum/bsf/ bsf/src/test/ bsf/xdocs/ cache/
cache/src/java/org/apache/fulcrum/cache/
cache/src/java/org/apache/fulcrum/cache/impl/ cache/src/test/ cache/s...
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/acl/AccessControlException.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/acl/AccessControlException.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/acl/AccessControlException.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/acl/AccessControlException.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.acl;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.fulcrum.security.util.TurbineSecurityException;
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/acl/AccessControlList.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/acl/AccessControlList.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/acl/AccessControlList.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/acl/AccessControlList.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.acl;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.io.Serializable;
@@ -20,7 +23,7 @@
/**
* This interface is a marker interface for AccessControlList. Basically
- * allows us at somepoint to swap different ACL's under the covers with
+ * allows us at somepoint to swap different ACL's under the covers with
* Avalon. Actual ACL's are dependent on their model being used.
*
* @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
@@ -30,6 +33,6 @@
extends Serializable
{
-
-
+
+
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/Authenticator.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/Authenticator.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/Authenticator.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/Authenticator.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.authenticator;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.fulcrum.security.entity.User;
@@ -28,7 +31,7 @@
{
public static final String ROLE = Authenticator.class.getName();
-
+
public boolean authenticate(User user, String password)
throws DataBackendException;
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/CryptoAuthenticator.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/CryptoAuthenticator.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/CryptoAuthenticator.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/CryptoAuthenticator.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.authenticator;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.security.NoSuchAlgorithmException;
@@ -37,7 +40,7 @@
* @avalon.component name="crypto-authenticator"
* @avalon.service type="org.apache.fulcrum.security.authenticator.Authenticator"
*/
-public class CryptoAuthenticator extends AbstractLogEnabled
+public class CryptoAuthenticator extends AbstractLogEnabled
implements Authenticator, Serviceable, Disposable, Configurable
{
boolean composed = false;
@@ -48,7 +51,7 @@
* Authenticate an username with the specified password. If authentication
* is successful the method returns true. If it fails, it returns false
* If there are any problems, an exception is thrown.
- *
+ *
*
* @param usernameAndDomain an string in the format [domain]/[username].
* @param password the user supplied password.
@@ -59,7 +62,7 @@
*/
public boolean authenticate(User user, String password) throws DataBackendException
{
-
+
try
{
CryptoAlgorithm ca = cryptoService.getCryptoAlgorithm(algorithm);
@@ -76,7 +79,7 @@
throw new DataBackendException(ex.getMessage(), ex);
}
}
-
+
// ---------------- Avalon Lifecycle Methods ---------------------
/**
* Avalon component lifecycle method
@@ -85,7 +88,7 @@
{
algorithm = conf.getChild("algorithm").getValue();
cipher = conf.getChild("cipher").getValue();
- }
+ }
/**
* Avalon component lifecycle method
@@ -94,7 +97,7 @@
{
this.cryptoService = (CryptoService)manager.lookup(CryptoService.ROLE);
}
-
+
/**
* Avalon component lifecycle method
*/
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/NoOpAuthenticator.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/NoOpAuthenticator.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/NoOpAuthenticator.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/NoOpAuthenticator.java Fri May 4 23:58:06 2007
@@ -1,24 +1,27 @@
package org.apache.fulcrum.security.authenticator;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.avalon.framework.logger.AbstractLogEnabled;
import org.apache.fulcrum.security.entity.User;
import org.apache.fulcrum.security.util.DataBackendException;
/**
- * This class authenticates by returning TRUE always. Regardless of the
+ * This class authenticates by returning TRUE always. Regardless of the
* user and password data.
*
* @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
@@ -31,7 +34,7 @@
/**
* Authenticate an username with the specified password. Always returns
* true.
- *
+ *
*
* @param user object
* @param password the user supplied password.
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/TextMatchAuthenticator.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/TextMatchAuthenticator.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/TextMatchAuthenticator.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/authenticator/TextMatchAuthenticator.java Fri May 4 23:58:06 2007
@@ -1,25 +1,28 @@
package org.apache.fulcrum.security.authenticator;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.avalon.framework.logger.AbstractLogEnabled;
import org.apache.fulcrum.security.entity.User;
import org.apache.fulcrum.security.util.DataBackendException;
/**
* This class authenticates by doing a plain text match of the user's passwords.
- * Very insecure!
+ * Very insecure!
*
* @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
* @version $Id$
@@ -31,7 +34,7 @@
/**
* Authenticate an username with the specified password. Returns true
* if the user password plain text matches the passed in password.
- *
+ *
*
* @param user object
* @param password the user supplied password.
@@ -44,10 +47,10 @@
{
if( user == null )
return false;
-
+
String referenced = user.getPassword() == null ? "" : user.getPassword().trim();
String tested = password == null ? "" : password.trim();
-
+
return referenced.equals(tested);
}
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Group.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Group.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Group.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Group.java Fri May 4 23:58:06 2007
@@ -1,19 +1,22 @@
package org.apache.fulcrum.security.entity;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.
*/
@@ -29,6 +32,6 @@
public interface Group extends SecurityEntity
{
-
+
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Permission.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Permission.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Permission.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Permission.java Fri May 4 23:58:06 2007
@@ -1,19 +1,22 @@
package org.apache.fulcrum.security.entity;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.
*/
@@ -29,5 +32,5 @@
*/
public interface Permission extends SecurityEntity
{
-
+
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Role.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Role.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Role.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/Role.java Fri May 4 23:58:06 2007
@@ -2,19 +2,22 @@
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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
*
- * 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
*
- * 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.
+ * 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.
*/
@@ -32,6 +35,6 @@
{
-
+
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/SecurityEntity.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/SecurityEntity.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/SecurityEntity.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/SecurityEntity.java Fri May 4 23:58:06 2007
@@ -1,19 +1,22 @@
package org.apache.fulcrum.security.entity;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.
*/
/**
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/User.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/User.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/User.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/User.java Fri May 4 23:58:06 2007
@@ -1,19 +1,22 @@
package org.apache.fulcrum.security.entity;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.io.Serializable;
/**
@@ -37,7 +40,7 @@
* @return A String with the password for the user.
*/
String getPassword();
-
+
/**
* Set password. Application should not use this method
* directly, see {@link #getPassword()}.
@@ -46,5 +49,5 @@
* @param password The new password.
*/
void setPassword(String password);
-
+
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/impl/SecurityEntityImpl.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/impl/SecurityEntityImpl.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/impl/SecurityEntityImpl.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/entity/impl/SecurityEntityImpl.java Fri May 4 23:58:06 2007
@@ -1,19 +1,22 @@
package org.apache.fulcrum.security.entity.impl;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.commons.lang.builder.HashCodeBuilder;
@@ -23,7 +26,7 @@
* Base class for all objects implementing SecurityEnitity. This class
* automatically lowercases the name. So the permission "EDIT" will equal "eDit"
* and "edit";
- *
+ *
* @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
* @version $Id$
*/
@@ -59,7 +62,7 @@
/**
* Pass in the name for this entity. Also lowercases it.
- *
+ *
* @param name
*/
public void setName(String name)
@@ -82,14 +85,14 @@
/**
* Check if this object is equal to another
- *
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(Object o)
{
boolean equals = true;
Object id = getId();
-
+
if (o == null || id == null)
{
equals = false;
@@ -107,7 +110,7 @@
/**
* Calculate a hash code for this object
- *
+ *
* @see java.lang.Object#hashCode()
*/
public int hashCode()
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/ACLFactory.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/ACLFactory.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/ACLFactory.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/ACLFactory.java Fri May 4 23:58:06 2007
@@ -1,19 +1,22 @@
package org.apache.fulcrum.security.model;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.fulcrum.security.acl.AccessControlList;
@@ -33,10 +36,10 @@
* @version $Id$
*/
public interface ACLFactory
-
+
{
public static final String ROLE = ACLFactory.class.getName();
public AccessControlList getAccessControlList(User user);
-
+
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicACLFactory.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicACLFactory.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicACLFactory.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicACLFactory.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.model.basic;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.fulcrum.security.acl.AccessControlList;
import org.apache.fulcrum.security.entity.User;
@@ -22,9 +25,9 @@
import org.apache.fulcrum.security.util.GroupSet;
import org.apache.fulcrum.security.util.UnknownEntityException;
/**
- *
+ *
* This factory creates instance of the DynamicAccessControlList
- *
+ *
* @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
* @version $Id$
*/
@@ -51,11 +54,11 @@
try
{
/*
- *
- @todo I think this is overkill for now..
- accessControlList =
- (AccessControlList) aclFactoryService.getInstance(aclClass.getName(), objects, signatures);
- */
+ *
+ * @todo I think this is overkill for now..
+ * accessControlList =
+ * (AccessControlList) aclFactoryService.getInstance(aclClass.getName(), objects, signatures);
+ */
accessControlList =
new BasicAccessControlListImpl(groupSet);
}
@@ -71,7 +74,7 @@
public AccessControlList getAccessControlList(User user)
{
GroupSet groupSet = ((BasicUser)user).getGroups();
-
+
try
{
return getAclInstance(groupSet);
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicAccessControlList.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicAccessControlList.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicAccessControlList.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicAccessControlList.java Fri May 4 23:58:06 2007
@@ -1,19 +1,22 @@
package org.apache.fulcrum.security.model.basic;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.io.Serializable;
@@ -24,7 +27,7 @@
/**
- * This interface describes a control class that makes it
+ * This interface describes a control class that makes it
* easy to find out if a particular User has a given Permission.
* It also determines if a User has a a particular Role.
*
@@ -56,5 +59,5 @@
* @return <code>true</code>if the user is assigned the Group.
*/
boolean hasGroup(String group);
-
+
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicAccessControlListImpl.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicAccessControlListImpl.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicAccessControlListImpl.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicAccessControlListImpl.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.model.basic;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.fulcrum.security.entity.Group;
import org.apache.fulcrum.security.util.GroupSet;
@@ -29,13 +32,13 @@
public class BasicAccessControlListImpl implements BasicAccessControlList
{
/**
- * Serial number
+ * Serial number
*/
private static final long serialVersionUID = 2911747448261740381L;
/** The distinct list of groups that this user is part of */
private GroupSet groupSet = new GroupSet();
-
+
/**
* Constructs a new AccessControlList.
*
@@ -56,9 +59,9 @@
{
this.groupSet = groupSet;
}
-
+
/**
- * Retrieves a set of Groups an user is assigned
+ * Retrieves a set of Groups an user is assigned
*
* @return the set of Groups
*/
@@ -66,7 +69,7 @@
{
return groupSet;
}
-
+
/**
* Checks if the user is assigned a specific Group
*
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicModelManager.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicModelManager.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicModelManager.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/BasicModelManager.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.model.basic;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.fulcrum.security.ModelManager;
@@ -25,7 +28,7 @@
* Describes all the relationships between entities in the "Basic" model.
* This model pretty much allows a user to be in multiple groups. There
* is no concept of Permissions, Roles, Groups in Groups etc..
- *
+ *
* @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
* @version $Id$
*/
@@ -33,9 +36,9 @@
{
/**
* Puts a user in a group.
- *
+ *
* This method is used when adding a user to a group
- *
+ *
* @param user the User.
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the account is not present.
@@ -43,7 +46,7 @@
void grant(User user, Group group) throws DataBackendException, UnknownEntityException;
/**
* Removes a user from a group
- *
+ *
* @param user the User.
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the user or group is not present.
@@ -51,9 +54,9 @@
void revoke(User user, Group group) throws DataBackendException, UnknownEntityException;
/**
* Revokes all groups from an User.
- *
+ *
* This method is used when deleting an account.
- *
+ *
* @param user the User.
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the account is not present.
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/BasicGroup.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/BasicGroup.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/BasicGroup.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/BasicGroup.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.model.basic.entity;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.Set;
@@ -24,7 +27,7 @@
/**
* Represents the "basic" model where users are part of groups, but nothing
* else.
- *
+ *
* @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
* @version $Id$
*/
@@ -32,42 +35,42 @@
{
/**
* Get the users that are part of this group
- *
+ *
* @return a set of users
*/
public UserSet getUsers();
/**
* Set the users that are part of this group
- *
+ *
* @param userSet a set of users
*/
public void setUsers(UserSet userSet);
-
+
/**
* Get the users that are part of this group as a Set
- *
+ *
* @return a set of users
*/
public Set getUsersAsSet();
/**
* Set the users that are part of this group as a Set
- *
+ *
* @param userSet a set of users
*/
public void setUsersAsSet(Set users);
-
+
/**
* Add a user to this group
- *
+ *
* @param user the user to add
*/
public void addUser(User user);
-
+
/**
* Remove a user from this group
- *
+ *
* @param user the user to remove
*/
public void removeUser(User user);
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/BasicUser.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/BasicUser.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/BasicUser.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/BasicUser.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.model.basic.entity;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.Set;
@@ -32,42 +35,42 @@
{
/**
* Get the groups this user is part of
- *
+ *
* @return a set of groups
*/
public GroupSet getGroups();
/**
* Set the groups this user is part of
- *
+ *
* @param groups the set of groups
*/
public void setGroups(GroupSet groups);
/**
- * Remove the group from the list of groups
- *
+ * Remove the group from the list of groups
+ *
* @param group the group to remove
*/
public void removeGroup(Group group);
/**
- * Add the group to the list of groups
- *
+ * Add the group to the list of groups
+ *
* @param group the group to add
*/
public void addGroup(Group group);
/**
* Set the groups this user is part of as a Set
- *
+ *
* @param groups the set of groups
*/
public void setGroupsAsSet(Set groups);
/**
* Get the groups this user is part of as a Set
- *
+ *
* @return a set of groups
*/
public Set getGroupsAsSet();
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/impl/BasicGroupImpl.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/impl/BasicGroupImpl.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/impl/BasicGroupImpl.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/impl/BasicGroupImpl.java Fri May 4 23:58:06 2007
@@ -1,87 +1,90 @@
-package org.apache.fulcrum.security.model.basic.entity.impl;
-/*
- * Copyright 2001-2004 The Apache Software Foundation
- *
- * 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.
- */
-
-import java.util.Set;
-
-import org.apache.fulcrum.security.entity.User;
-import org.apache.fulcrum.security.entity.impl.SecurityEntityImpl;
-import org.apache.fulcrum.security.model.basic.entity.BasicGroup;
-import org.apache.fulcrum.security.util.UserSet;
-
-/**
- * Represents the "basic" model where users are part of groups, but nothing
- * else.
- *
- * @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
- * @version $Id: BasicGroup.java 223057 2004-07-05 19:28:23Z epugh $
- */
-public class BasicGroupImpl extends SecurityEntityImpl implements BasicGroup
-{
- private Set userSet = new UserSet();
- /**
- * @return
- */
- public UserSet getUsers()
- {
- if( userSet instanceof UserSet )
- return (UserSet) userSet;
- else {
- userSet = new UserSet(userSet);
- return (UserSet)userSet;
- }
- }
-
- /**
- * @param userSet
- */
- public void setUsers(UserSet userSet)
- {
- if( userSet != null )
- this.userSet = userSet;
- else
- this.userSet = new UserSet();
- }
-
- /**
- * @return
- */
- public Set getUsersAsSet()
- {
- return userSet;
- }
-
- /**
- * @param userSet
- */
- public void setUsersAsSet(Set users)
- {
- this.userSet = users;
- }
-
-
-
- public void addUser(User user)
- {
- getUsers().add(user);
- }
- public void removeUser(User user)
- {
- getUsers().remove(user);
- }
-
-
-}
+package org.apache.fulcrum.security.model.basic.entity.impl;
+/*
+ * 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.Set;
+
+import org.apache.fulcrum.security.entity.User;
+import org.apache.fulcrum.security.entity.impl.SecurityEntityImpl;
+import org.apache.fulcrum.security.model.basic.entity.BasicGroup;
+import org.apache.fulcrum.security.util.UserSet;
+
+/**
+ * Represents the "basic" model where users are part of groups, but nothing
+ * else.
+ *
+ * @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
+ * @version $Id: BasicGroup.java 223057 2004-07-05 19:28:23Z epugh $
+ */
+public class BasicGroupImpl extends SecurityEntityImpl implements BasicGroup
+{
+ private Set userSet = new UserSet();
+ /**
+ * @return
+ */
+ public UserSet getUsers()
+ {
+ if( userSet instanceof UserSet )
+ return (UserSet) userSet;
+ else {
+ userSet = new UserSet(userSet);
+ return (UserSet)userSet;
+ }
+ }
+
+ /**
+ * @param userSet
+ */
+ public void setUsers(UserSet userSet)
+ {
+ if( userSet != null )
+ this.userSet = userSet;
+ else
+ this.userSet = new UserSet();
+ }
+
+ /**
+ * @return
+ */
+ public Set getUsersAsSet()
+ {
+ return userSet;
+ }
+
+ /**
+ * @param userSet
+ */
+ public void setUsersAsSet(Set users)
+ {
+ this.userSet = users;
+ }
+
+
+
+ public void addUser(User user)
+ {
+ getUsers().add(user);
+ }
+ public void removeUser(User user)
+ {
+ getUsers().remove(user);
+ }
+
+
+}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/impl/BasicUserImpl.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/impl/BasicUserImpl.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/impl/BasicUserImpl.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/entity/impl/BasicUserImpl.java Fri May 4 23:58:06 2007
@@ -1,108 +1,111 @@
-package org.apache.fulcrum.security.model.basic.entity.impl;
-/*
- * Copyright 2001-2004 The Apache Software Foundation
- *
- * 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.
- */
-
-import java.util.Set;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.fulcrum.security.entity.Group;
-import org.apache.fulcrum.security.entity.impl.SecurityEntityImpl;
-import org.apache.fulcrum.security.model.basic.entity.BasicUser;
-import org.apache.fulcrum.security.util.GroupSet;
-
-/**
- * Represents the "basic" model where users can be part of multiple groups
- * directly, with no roles or permissions.
- *
- * @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
- * @version $Id: BasicUser.java 437451 2006-08-27 20:20:44Z tv $
- */
-public class BasicUserImpl extends SecurityEntityImpl implements BasicUser
-{
- /**
- * Serial number
- */
- private static final long serialVersionUID = 7911631916604987203L;
-
- private String password;
- private Set groupSet = new GroupSet();
-
- /**
- * @return
- */
- public String getPassword()
- {
- return password;
- }
- /**
- * @param password
- */
- public void setPassword(String password)
- {
- this.password = password;
- }
- /**
- * @return
- */
- public GroupSet getGroups()
- {
- if( groupSet instanceof GroupSet )
- return (GroupSet) groupSet;
- else {
- groupSet = new GroupSet(groupSet);
- return (GroupSet)groupSet;
- }
- }
- /**
- * @param groups
- */
- public void setGroups(GroupSet groups)
- {
- if( groups != null )
- this.groupSet = groups;
- else
- this.groupSet = new GroupSet();
- }
- public void removeGroup(Group group)
- {
- getGroups().remove(group);
- }
- public void addGroup(Group group)
- {
- getGroups().add(group);
- }
- public void setGroupsAsSet(Set groups)
- {
- this.groupSet = groups;
- }
- public Set getGroupsAsSet()
- {
- return groupSet;
- }
-
- /**
- * Calculate a hash code for this object
- *
- * @see org.apache.fulcrum.security.entity.impl.SecurityEntityImpl#hashCode()
- */
- public int hashCode()
- {
- return new HashCodeBuilder(43, 19)
- .append(getPassword())
- .appendSuper(super.hashCode())
- .toHashCode();
- }
-}
+package org.apache.fulcrum.security.model.basic.entity.impl;
+/*
+ * 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.Set;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.fulcrum.security.entity.Group;
+import org.apache.fulcrum.security.entity.impl.SecurityEntityImpl;
+import org.apache.fulcrum.security.model.basic.entity.BasicUser;
+import org.apache.fulcrum.security.util.GroupSet;
+
+/**
+ * Represents the "basic" model where users can be part of multiple groups
+ * directly, with no roles or permissions.
+ *
+ * @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
+ * @version $Id: BasicUser.java 437451 2006-08-27 20:20:44Z tv $
+ */
+public class BasicUserImpl extends SecurityEntityImpl implements BasicUser
+{
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 7911631916604987203L;
+
+ private String password;
+ private Set groupSet = new GroupSet();
+
+ /**
+ * @return
+ */
+ public String getPassword()
+ {
+ return password;
+ }
+ /**
+ * @param password
+ */
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+ /**
+ * @return
+ */
+ public GroupSet getGroups()
+ {
+ if( groupSet instanceof GroupSet )
+ return (GroupSet) groupSet;
+ else {
+ groupSet = new GroupSet(groupSet);
+ return (GroupSet)groupSet;
+ }
+ }
+ /**
+ * @param groups
+ */
+ public void setGroups(GroupSet groups)
+ {
+ if( groups != null )
+ this.groupSet = groups;
+ else
+ this.groupSet = new GroupSet();
+ }
+ public void removeGroup(Group group)
+ {
+ getGroups().remove(group);
+ }
+ public void addGroup(Group group)
+ {
+ getGroups().add(group);
+ }
+ public void setGroupsAsSet(Set groups)
+ {
+ this.groupSet = groups;
+ }
+ public Set getGroupsAsSet()
+ {
+ return groupSet;
+ }
+
+ /**
+ * Calculate a hash code for this object
+ *
+ * @see org.apache.fulcrum.security.entity.impl.SecurityEntityImpl#hashCode()
+ */
+ public int hashCode()
+ {
+ return new HashCodeBuilder(43, 19)
+ .append(getPassword())
+ .appendSuper(super.hashCode())
+ .toHashCode();
+ }
+}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/test/AbstractModelManagerTest.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/test/AbstractModelManagerTest.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/test/AbstractModelManagerTest.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/basic/test/AbstractModelManagerTest.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.model.basic.test;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.fulcrum.security.GroupManager;
@@ -27,7 +30,7 @@
import org.apache.fulcrum.testcontainer.BaseUnitTest;
/**
* @author Eric Pugh
- *
+ *
* To change the template for this generated type comment go to Window>Preferences>Java>Code
* Generation>Code and Comments
*/
@@ -48,7 +51,7 @@
}
/**
* Constructor for AbstractRoleManagerTest.
- *
+ *
* @param arg0
*/
public AbstractModelManagerTest(String arg0)
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/AbstractDynamicModelManager.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/AbstractDynamicModelManager.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/AbstractDynamicModelManager.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/AbstractDynamicModelManager.java Fri May 4 23:58:06 2007
@@ -1,19 +1,22 @@
package org.apache.fulcrum.security.model.dynamic;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.fulcrum.security.entity.Group;
@@ -31,7 +34,7 @@
/**
* Holds shared functionality between different implementations of
* DyanamicModelManager's.
- *
+ *
* @author <a href="mailto:epugh@upstate.com">Eric Pugh </a>
* @author <a href="mailto:ben@gidley.co.uk">Ben Gidley</a>
* @version $Id: AbstractDynamicModelManager.java,v 1.2 2004/07/07 18:18:09
@@ -41,9 +44,9 @@
implements DynamicModelManager {
/**
* Revokes all roles from a permission
- *
+ *
* This method is used when deleting a permission.
- *
+ *
* @param permission
* the permission.
* @throws DataBackendException
@@ -71,9 +74,9 @@
/**
* Revokes all users and roles from a group
- *
+ *
* This method is used when deleting a group.
- *
+ *
* @param group
* the Group.
* @throws DataBackendException
@@ -105,9 +108,9 @@
/**
* Revokes all groups from a user
- *
+ *
* This method is used when deleting an account.
- *
+ *
* @param user
* the User.
* @throws DataBackendException
@@ -134,9 +137,9 @@
/**
* Revokes all permissions and groups from a Role.
- *
+ *
* This method is used when deleting a Role.
- *
+ *
* @param role
* the Role
* @throws DataBackendException
@@ -202,4 +205,4 @@
}
}
-}
\ No newline at end of file
+}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicACLFactory.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicACLFactory.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicACLFactory.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicACLFactory.java Fri May 4 23:58:06 2007
@@ -1,19 +1,22 @@
package org.apache.fulcrum.security.model.dynamic;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.HashMap;
import java.util.HashSet;
@@ -33,9 +36,9 @@
import org.apache.fulcrum.security.util.UnknownEntityException;
/**
- *
+ *
* This factory creates instance of the DynamicAccessControlList
- *
+ *
* @author <a href="mailto:epugh@upstate.com">Eric Pugh </a>
* @author <a href="mailto:ben@gidley.co.uk">Ben Gidley </a>
* @version $Id$
@@ -44,15 +47,15 @@
{
/**
* Construct a new ACL object.
- *
+ *
* This constructs a new ACL object from the configured class and
* initializes it with the supplied roles and permissions.
- *
+ *
* @param roles
* The roles that this ACL should contain
* @param permissions
* The permissions for this ACL
- *
+ *
* @return an object implementing ACL interface.
* @throws UnknownEntityException
* if the object could not be instantiated.
@@ -66,7 +69,7 @@
try
{
/*
- *
+ *
* @todo I think this is overkill for now.. accessControlList =
* (AccessControlList)
* aclFactoryService.getInstance(aclClass.getName(), objects,
@@ -128,7 +131,7 @@
* Adds the passed users roles and permissions to the sets As maps overwrite
* duplicates we just put it in an let it overwrite it is probably quicker
* than checking for duplicates
- *
+ *
* @param user
* @param roleSets
* @param permissionSets
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicAccessControlList.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicAccessControlList.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicAccessControlList.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicAccessControlList.java Fri May 4 23:58:06 2007
@@ -1,19 +1,22 @@
package org.apache.fulcrum.security.model.dynamic;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.io.Serializable;
@@ -28,7 +31,7 @@
/**
- * This interface describes a control class that makes it
+ * This interface describes a control class that makes it
* easy to find out if a particular User has a given Permission.
* It also determines if a User has a a particular Role.
*
@@ -194,5 +197,5 @@
* @return <code>true</code> if the user is assigned the Permission in the global Group.
*/
boolean hasPermission(String permission);
-
+
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicAccessControlListImpl.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicAccessControlListImpl.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicAccessControlListImpl.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicAccessControlListImpl.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.model.dynamic;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.Iterator;
import java.util.Map;
@@ -36,10 +39,10 @@
public class DynamicAccessControlListImpl implements DynamicAccessControlList
{
/**
- * Serial number
+ * Serial number
*/
private static final long serialVersionUID = -5180551537096244085L;
-
+
/** The sets of roles that the user has in different groups */
private Map roleSets;
/** The sets of permissions that the user has in different groups */
@@ -135,7 +138,7 @@
*
* @return the set of Permissions this user has within the global Group.
*/
- public PermissionSet getPermissions()
+ public PermissionSet getPermissions()
{
return permissionSet;
}
Modified: jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicModelManager.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicModelManager.java?view=diff&rev=535465&r1=535464&r2=535465
==============================================================================
--- jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicModelManager.java (original)
+++ jakarta/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/model/dynamic/DynamicModelManager.java Fri May 4 23:58:06 2007
@@ -1,18 +1,21 @@
package org.apache.fulcrum.security.model.dynamic;
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * 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
*
- * 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
*
- * 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.
+ * 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.fulcrum.security.ModelManager;
@@ -25,7 +28,7 @@
/**
* Describes all the relationships between entities in the "Dynamic" model.
- *
+ *
* @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
* @author <a href="mailto:ben@gidley.co.uk">Ben Gidley</a>
* @version $Id$
@@ -34,9 +37,9 @@
{
/**
* Puts a role into a group
- *
+ *
* This method is used when adding a role to a group.
- *
+ *
* @param group the group to use
* @param role the role that will join the group
* @throws DataBackendException if there was an error accessing the data backend.
@@ -46,9 +49,9 @@
/**
* Remove a role from a group
- *
+ *
* This method is used when removeing a role to a group.
- *
+ *
* @param group the group to use
* @param role the role that will join the group
* @throws DataBackendException if there was an error accessing the data backend.
@@ -58,9 +61,9 @@
/**
* Puts a permission in a role
- *
+ *
* This method is used when adding a permission to a role
- *
+ *
* @param user the User.
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the account is not present.
@@ -69,7 +72,7 @@
throws DataBackendException, UnknownEntityException;
/**
* Removes a permission from a role
- *
+ *
* @param role the Role.
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the user or group is not present.
@@ -79,9 +82,9 @@
/**
* Puts a user in a group.
- *
+ *
* This method is used when adding a user to a group
- *
+ *
* @param user the User.
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the account is not present.
@@ -89,7 +92,7 @@
void grant(User user, Group group) throws DataBackendException, UnknownEntityException;
/**
* Removes a user from a group
- *
+ *
* @param user the User.
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the user or group is not present.
@@ -97,9 +100,9 @@
void revoke(User user, Group group) throws DataBackendException, UnknownEntityException;
/**
* Revokes all roles from an User.
- *
+ *
* This method is typically used when deleting an account.
- *
+ *
* @param user the User.
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the account is not present.
@@ -107,9 +110,9 @@
void revokeAll(User user) throws DataBackendException, UnknownEntityException;
/**
* Revoke from a permission all roles
- *
+ *
* This method is typically used when deleting a Permission
- *
+ *
* @param permission the Permission.
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the permission is not present.
@@ -117,9 +120,9 @@
void revokeAll(Permission permission) throws DataBackendException, UnknownEntityException;
/**
* Revokes all permissions from a Role.
- *
+ *
* This method is typically used when deleting a Role.
- *
+ *
* @param role the Role
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the Role is not present.
@@ -127,22 +130,22 @@
void revokeAll(Role role) throws DataBackendException, UnknownEntityException;
/**
* Revokes all roles and users from a Group
- *
+ *
* This method is typically used when deleting a Group.
- *
+ *
* @param group the Group
* @throws DataBackendException if there was an error accessing the data backend.
* @throws UnknownEntityException if the Group is not present.
*/
void revokeAll(Group group) throws DataBackendException, UnknownEntityException;
-
+
/**
* Allow B to assumes A's roles, groups and permissions
* @param delegator A
* @param delegatee B
*/
void addDelegate(User delegator, User delegatee) throws DataBackendException, UnknownEntityException;
-
+
/**
* Stop A having B's roles, groups and permissions
* @param delegate A
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org