Package boco.ejb3PlugIn.gui

Examples of boco.ejb3PlugIn.gui.BeanDialog


        return;
      }

      IPackageFragment entityPackage = (IPackageFragment) iCompilationUnit.getParent();

      BeanDialog beanDialog = new BeanDialog(javaProject.getProject().getLocation().toOSString());
      beanDialog.pack();
      beanDialog.setLocationRelativeTo(null);
      beanDialog.setVisible(true);
      String beanName = Utils.makeFirstLetterUpperCase(beanDialog.getBeanName());

      if ((beanName != null) && (!beanName.equals("")))
      {
        String sourceCode = "/*****************************************************************************\r\n";
        sourceCode += "*   Copyright (c) 2006 - 2008  Fabrizio Boco <fabboco@users.sourceforge.net> *\r\n";
 
View Full Code Here


  {
    //Shell shell = new Shell();

    try
    {
      BeanDialog beanDialog = new BeanDialog(javaProject.getProject().getLocation().toOSString());
      beanDialog.pack();
      beanDialog.setLocationRelativeTo(null);
      beanDialog.setVisible(true);

      if (!beanDialog.isCancelled())
      {
        String beanName = Utils.makeFirstLetterUpperCase(beanDialog.getBeanName());

        String sourceCode = "/*****************************************************************************\r\n";
        sourceCode += "*   Copyright (c) 2006 - 2008  Fabrizio Boco <fabboco@users.sourceforge.net> *\r\n";
        sourceCode += "*                                                                            *\r\n";
        sourceCode += "*   This file is generated with SeamWebAppGen.                               *\r\n";
        sourceCode += "*                                                                            *\r\n";
        sourceCode += "*   This library is free software; you can redistribute it and/or            *\r\n";
        sourceCode += "*   modify it under the terms of the GNU Library General Public              *\r\n";
        sourceCode += "*   License as published by the Free Software Foundation; either             *\r\n";
        sourceCode += "*   version 2 of the License, or (at your option) any later version.         *\r\n";
        sourceCode += "*                                                                            *\r\n";
        sourceCode += "*   This library  is distributed in the hope that it will be useful,         *\r\n";
        sourceCode += "*   but WITHOUT ANY WARRANTY; without even the implied warranty of           *\r\n";
        sourceCode += "*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *\r\n";
        sourceCode += "*   GNU Library General Public License for more details.                     *\r\n";
        sourceCode += "*                                                                            *\r\n";
        sourceCode += "*   You should have received a copy of the GNU Library General Public        *\r\n";
        sourceCode += "*   License along with this library; see the file COPYING.LIB. If not,       *\r\n";
        sourceCode += "*   write to the Free Software Foundation, Inc., 59 Temple Place,            *\r\n";
        sourceCode += "*   Suite 330, Boston, MA  02111-1307, USA                                   *\r\n";
        sourceCode += "*                                                                            *\r\n";
        sourceCode += "******************************************************************************/\r\n";

        sourceCode += "\r\n\r\n";

        sourceCode += "/**\r\n";
        sourceCode += "- $" + "Header:   $\r\n";
        sourceCode += "- $" + "Author:   $\r\n";
        sourceCode += "- $" + "Revision: $\r\n";
        sourceCode += "- $" + "Date:     $\r\n";
        sourceCode += "\r\n\r\n";
        sourceCode += "- $" + "Log:      $\r\n";
        sourceCode += "**/\r\n";

        sourceCode += "\r\n\r\n";

        sourceCode += "package " + packageFragment.getElementName() + ";\r\n";
        sourceCode += "\r\n";
        sourceCode += "\r\n";

        sourceCode += "import javax.persistence.Entity;\r\n";
        sourceCode += "import javax.persistence.Table;\r\n";
        sourceCode += "import javax.persistence.Transient;\r\n";
        sourceCode += "import javax.persistence.Id;\r\n";
        sourceCode += "import javax.persistence.GeneratedValue;\r\n";
        sourceCode += "import javax.persistence.GenerationType;\r\n";
        sourceCode += "import java.io.Serializable;\r\n";
        sourceCode += "import org.jboss.seam.annotations.Name;\r\n";
        sourceCode += "import org.jboss.seam.annotations.Scope;\r\n";
        sourceCode += "import static org.jboss.seam.ScopeType.CONVERSATION;\r\n";
        sourceCode += "import org.boco.seamwebappgen.annotations.Security;\r\n";
        sourceCode += "import org.boco.seamwebappgen.annotations.ShowList;\r\n";
        sourceCode += "import org.boco.seamwebappgen.annotations.IgnoreBean;\r\n";
        sourceCode += "import org.boco.seamwebappgen.annotations.IgnoreBeanManager;\r\n";
        sourceCode += "import org.boco.seamwebappgen.annotations.IgnorePrintListForm;\r\n";
        sourceCode += "import org.boco.seamwebappgen.annotations.IgnorePrintForm;\r\n";

        sourceCode += "\r\n";
        sourceCode += "\r\n";
        sourceCode += "@Entity\r\n";
        sourceCode += "@Name(\"" + Utils.makeFirstLetterLowerCase(beanName) + "\")\r\n";
        sourceCode += "@Scope(CONVERSATION)\r\n";
        sourceCode += "@Table(name = \"" + beanName + "\")\r\n";

        sourceCode += Utils.makeShowListAnnotation(beanDialog).replace(" = ", "=").replace(", ", ",");
        sourceCode += Utils.makeSecurityAnnotation(beanDialog).replace(" = ", "=").replace(", ", ",");

        if (beanDialog.ignoreBean())
        {
          sourceCode += "@IgnoreBean()\r\n";
        }
        if (beanDialog.ignoreBeanManager())
        {
          sourceCode += "@IgnoreBeanManager()\r\n";
        }
        if (beanDialog.ignoreBeanLists())
        {
          sourceCode += "@IgnoreBeanLists()\r\n";
        }
        if (beanDialog.ignoreBeanLists())
        {
          sourceCode += "@IgnoreBeanLists()\r\n";
        }
        if (beanDialog.ignorePrintForm())
        {
          sourceCode += "@IgnorePrintForm()\r\n";
        }
        if (beanDialog.ignorePrintList())
        {
          sourceCode += "@IgnorePrintListForm()\r\n";
        }
        sourceCode += "public class " + beanName + " implements Serializable\r\n";
        sourceCode += "{\r\n";
View Full Code Here

  {
    Shell shell = new Shell();

    try
    {
      BeanDialog beanDialog = new BeanDialog(javaProject.getProject().getLocation().toOSString());
      beanDialog.pack();
      beanDialog.setLocationRelativeTo(null);
      beanDialog.setVisible(true);
      String beanName = Utils.makeFirstLetterUpperCase(beanDialog.getBeanName());

      if ((beanName != null) && (!beanName.equals("")))
      {
        // System.out.println("Creazione del bean  " + beanName + " nel package " + packageFragment.getElementName() + " del progetto " + javaProject.getElementName());
View Full Code Here

  {
    try
    {
      String source = iCompilationUnit.getSource();

      BeanDialog beanDialog = new BeanDialog(javaProject.getProject().getLocation().toOSString());
      beanDialog.setBeanName(getBeanName(source));

      /** Estrae le annotazioni **/
      String beforeShowListAnnotation = getShowListAnnotation(source);
      String beforeSecurityAnnotation = getSecurityAnnotation(source);
      boolean beforeIgnoreBean = ignoreBean(source);
      boolean beforeIgnoreBeanManager = ignoreBeanManager(source);

      /** Caricamento dei dati annotazione @ShowList **/
      if (!beforeShowListAnnotation.equals(""))
      {
        Vector<ListInfo> lists = getListsInfo(beforeShowListAnnotation);

        beanDialog.setLists(lists);
      }

      /** Caricamento dei dati annotazione @Security **/
      if (!beforeSecurityAnnotation.equals(""))
      {
        Vector<String> rolesEnabledToCreate = getRolesEnabledToCreate(beforeSecurityAnnotation);
        beanDialog.setCreateEnabledRoles(rolesEnabledToCreate);
        beanDialog.setCreateCondition(getCreateCondition(beforeSecurityAnnotation));

        Vector<String> rolesEnabledToEdit = getRolesEnabledToEdit(beforeSecurityAnnotation);
        beanDialog.setEditEnabledRoles(rolesEnabledToEdit);
        beanDialog.setEditCondition(getEditCondition(beforeSecurityAnnotation));

        Vector<String> rolesEnabledToDelete = getRolesEnabledToDelete(beforeSecurityAnnotation);
        beanDialog.setDeleteEnabledRoles(rolesEnabledToDelete);
        beanDialog.setDeleteCondition(getDeleteCondition(beforeSecurityAnnotation));
      }

      /** Caricamento dei dati sulle annotazioni sulla generazione **/
      beanDialog.setIgnoreBean(beforeIgnoreBean);
      beanDialog.setIgnoreBeanManager(beforeIgnoreBeanManager);

      beanDialog.pack();
      beanDialog.setLocationRelativeTo(null);
      beanDialog.setVisible(true);

      if (!beanDialog.isCancelled())
      {
        /** Rigenerazione del codice delle annotazioni **/

        String afterShowListAnnotation = Utils.makeShowListAnnotation(beanDialog).replace(" = ", "=").replace(", ", ",").replace("\r", "").replace("\n", "");
        String afterSecurityAnnotation = Utils.makeSecurityAnnotation(beanDialog).replace(" = ", "=").replace(", ", ",").replace("\r", "").replace("\n", "");
        boolean afterIgnoreBean = beanDialog.ignoreBean();
        boolean afterIgnoreBeanManager = beanDialog.ignoreBeanManager();

        if (!beforeShowListAnnotation.replace(" = ", "=").replace(", ", ",").equals(afterShowListAnnotation) || !beforeSecurityAnnotation.replace(" = ", "=").replace(", ", ",").equals(afterSecurityAnnotation) || beforeIgnoreBean != afterIgnoreBean || beforeIgnoreBeanManager != afterIgnoreBeanManager

        )
        {
View Full Code Here

    /** ListDialog **/
    //ListDialog bd = new ListDialog("");
    //bd.setVisible(true);
   
    /** BeanDialog **/
    BeanDialog bd = new BeanDialog(".");
    bd.setVisible(true);

   
    /** **/
   
    this.pack();
 
View Full Code Here

TOP

Related Classes of boco.ejb3PlugIn.gui.BeanDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.