/*
 * $Id$ $Revision$
 * $Date$
 * 
 * ==============================================================================
 * 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 wicket.authorization;

import java.io.Serializable;

/**
 * A token/key that represents a given component action that needs to be
 * authorized. For example, Component.RENDER or Component.ENABLE.
 * 
 * @see wicket.Component#RENDER
 * @see wicket.Component#ENABLE
 * 
 * @author Eelco Hillenius
 * @author Jonathan Locke
 * @since 1.2
 */
public class Action implements Serializable
{
	private static final long serialVersionUID = -1L;

	/** The name of this action. */
	private final String name;

	/**
	 * Construct.
	 * 
	 * @param name
	 *            The name of this action for debug purposes
	 */
	public Action(String name)
	{
		if (name == null)
		{
			throw new IllegalArgumentException("Name argument may not be null");
		}

		this.name = name;
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString()
	{
		return name;
	}
}

@@ -1435,16 +1435,400 @@
 me;%0A%09%7D%0A%0A
+%09/**%0A%09 * @see java.lang.Object#equals(java.lang.Object)%0A%09 */%0A%09public boolean equals(Object obj)%0A%09%7B%0A%09%09if (obj instanceof Action)%0A%09%09%7B%0A%09%09%09Action that = (Action)obj;%0A%09%09%09return name.equals(that.name);%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A%0A%09/**%0A%09 * @see java.lang.Object#hashCode()%0A%09 */%0A%09public int hashCode()%0A%09%7B%0A%09%09int result = %22Action%22.hashCode();%0A%09%09result += name.hashCode();%0A%09%09return 17 * result;%0A%09%7D%0A%0A
 %09/**%0A%09 *

put equals and hashCode back