/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.ejb3.dd;

import java.util.ArrayList;
import java.util.List;
import org.jboss.logging.Logger;

/**
 * Represents <assembly-descriptor> elements of the ejb-jar.xml deployment descriptor for the 1.4
 * schema
 *
 * @author <a href="mailto:bdecoste@jboss.com">William DeCoste</a>
 * @version <tt>$Revision: 1.6.2.3 $</tt>
 */
public class AssemblyDescriptor
{
   private static final Logger log = Logger.getLogger(AssemblyDescriptor.class);

   private List securityRoles = new ArrayList();

   private List methodPermissions = new ArrayList();

   private List containerTransactions = new ArrayList();

   private ExcludeList excludeList;

   private RemoveList removeList;

   private InitList initList;

   private List injects = new ArrayList();

   private List callbacks = new ArrayList();

   public InitList getInitList()
   {
      return initList;
   }

   public void setInitList(InitList initList)
   {
      this.initList = initList;
   }

   public RemoveList getRemoveList()
   {
      return removeList;
   }

   public void setRemoveList(RemoveList removeList)
   {
      this.removeList = removeList;
   }

   public ExcludeList getExcludeList()
   {
      return excludeList;
   }

   public void setExcludeList(ExcludeList excludeList)
   {
      this.excludeList = excludeList;
   }

   public List getSecurityRoles()
   {
      return securityRoles;
   }

   public void setSecurityRoles(List securityRoles)
   {
      this.securityRoles = securityRoles;
   }

   public void addSecurityRole(SecurityRole securityRole)
   {
      securityRoles.add(securityRole);
   }

   public List getCallbacks()
   {
      return callbacks;
   }

   public void addCallback(Callback callback)
   {
      callbacks.add(callback);
   }

   public List getInjects()
   {
      return injects;
   }

   public void addInject(Inject inject)
   {
      injects.add(inject);
   }

   public List getMethodPermissions()
   {
      return methodPermissions;
   }

   public void setMethodPermissions(List methodPermissions)
   {
      this.methodPermissions = methodPermissions;
   }

   public void addMethodPermission(MethodPermission methodPermission)
   {
      methodPermissions.add(methodPermission);
   }

   public List getContainerTransactions()
   {
      return containerTransactions;
   }

   public void setContainerTransactions(List containerTransactions)
   {
      this.containerTransactions = containerTransactions;
   }

   public void addContainerTransaction(ContainerTransaction containerTransaction)
   {
      containerTransactions.add(containerTransaction);
   }

   public String toString()
   {
      StringBuffer sb = new StringBuffer(100);
      sb.append("[");
      sb.append("securityRoles=").append(securityRoles);
      sb.append("]");
      return sb.toString();
   }
}
