/** 
 * 
 * Copyright 2004 Hiram Chirino
 * 
 * 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.codehaus.activemq.security.jassjacc;

import java.io.Serializable;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

/**
 * Used to define permissions needed to operate against the ActiveMQ destinations.
 * 
 * @version $Revision: 1.1 $
 */
public final class JMSDestinationPermission extends AbstractJMSPermission implements Serializable {

	public static final String SEND_ACTION = "send";
	public static final String PRODUCE_ACTION = "produce";
	public static final String CONSUME_ACTION = "consume";
	
	public static final Set VALID_ACTIONS;
	static {
		HashSet hs = new HashSet();
		hs.add(CONSUME_ACTION);
		hs.add(PRODUCE_ACTION);
		hs.add(SEND_ACTION);
		VALID_ACTIONS = Collections.unmodifiableSet(hs);
	}
	
	public JMSDestinationPermission(String destinationName, String action) {
		super(destinationName, action);
	}

	public Set getValidSetOfActions() {
		return VALID_ACTIONS;
	}
}

