Examples of Parcel


Examples of br.com.visualmidia.business.Parcel

                    try {
                        registration = (Registration) system.query(new GetRegistration(idRegistration[0]));
                       
                        List <Parcel> list =  registration.getParcels();
                       
                        Parcel parcel = list.get(Integer.parseInt(idRegistration[1])-1);
                       
                        if(!parcel.isPayed()){
                            new ParcelPaymentDialog(getShell(), getMySelf(), registration, canBePaid(list, parcel), Integer.parseInt(idRegistration[1])-1).open();
                        }else{
                            setMessage("Esta parcela ja esta paga", IMessageProvider.ERROR);
                        }
                    } catch (Exception e) {
View Full Code Here

Examples of br.com.visualmidia.business.Parcel

                        List<Parcel> list = registration.getParcels();
                        if(list.size() > 0){
                      MergeSortAlgorithm sort = new MergeSortAlgorithm();
                      sort.sortParcelByDate(list);
                      int counter = Integer.valueOf(idRegistration[1])-1;
                          Parcel parcel = list.get(counter);
                         
                          if (!parcel.isPayed()) {
                            new ParcelEditDialog(getShell(), getMySelf(), registration, counter).open();
                          } else {
                            setMessage("Parcela paga n�o pode ser alterada.", IMessageProvider.ERROR);
                          }
                        }
View Full Code Here

Examples of br.com.visualmidia.business.Parcel

          }else{
                  Registration registration = system.getRegistrations ().get(idRegistration);
                  if(registration == null || registration.getParcel(parcelId) == null){
                    paymentType = system.getPaymentMoney();
                  }else{
            Parcel parcel = registration.getParcel(parcelId);
            paymentType = parcel.getPayment();
                  }
          }

            if (this.discount != 0) {
                operation = new Operation(id, system.getAccounts().get(accountId), categoryId, gdDate, description, value, paymentType, _receivedValue, discount);
View Full Code Here

Examples of br.com.visualmidia.business.Parcel

      float valueBeforeDateExpiration = valueAfterDateExpiration - discount;
     
      Registration registration = system.getRegistrations().get(_idRegistration);
      if(registration != null){
        for (int i = 0; i < Integer.parseInt(_numberOfParcels); i++) {
          Parcel parcel = new Parcel(_date.getFormatedDate(), valueAfterDateExpiration, valueBeforeDateExpiration, Float.parseFloat("0"), Float.parseFloat("0"), Float.parseFloat("0"), Float.parseFloat("0"));
          registration.getParcels().add(parcel);
          _date.addMonth(1);
        }
      }
  }
View Full Code Here

Examples of com.oracle.demo.ops.domain.Parcel

    shipment.getToAddress().setAddressLine1("Southern Methodist University");
    shipment.getToAddress().setCity("Dallas");
    shipment.getToAddress().setState("TX");
    shipment.getToAddress().setPostalCode("75275");

    Parcel p = new Parcel();
    p.setContents("stuff");
    p.setWeight(10);
    p.setHeight(10);
    p.setWidth(10);
    p.setLength(10);
    p.setParcelStatus(ParcelStatus.BILLING_INFO_RECEIVED);
    shipment.getParcels().add(p);

    p = new Parcel();
    p.setContents("more stuff");
    p.setWeight(10);
    p.setHeight(10);
    p.setWidth(10);
    p.setLength(10);
    p.setParcelStatus(ParcelStatus.BILLING_INFO_RECEIVED);
    shipment.getParcels().add(p);

    return shipment;
  }
View Full Code Here

Examples of com.sun.star.script.framework.container.Parcel

                    String languageName = newName + "." + provider.getScriptEditor().getExtension();
                    String language = container.getLanguage();

                    ScriptEntry entry = new ScriptEntry( language, languageName, languageName, "", new HashMap() );

                    Parcel parcel = (Parcel)container.getByName( getName() );
                    ScriptMetaData data = new ScriptMetaData( parcel, entry, source );
                    parcel.insertByName( languageName, data );

                    ScriptBrowseNode sbn = new ScriptBrowseNode( provider, parcel, languageName );

          if(browsenodes==null)
          {
              LogUtils.DEBUG("browsenodes null!!");
              browsenodes = new ArrayList(4);
          }
                    browsenodes.add(sbn);
                                                                               
                    result = new Any(new Type(XBrowseNode.class), sbn);
                }
            }
            catch (Exception e)
            {
    LogUtils.DEBUG("ParcelBrowseNode[create] failed with: " + e );
                LogUtils.DEBUG( LogUtils.getTrace( e ) );
                result = new Any(new Type(Boolean.class), Boolean.FALSE);

                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error creating script: " + e.getMessage());
            }
        }
        else if (aFunctionName.equals("Deletable"))
        {
            try
            {
                if ( container.deleteParcel(getName()) )
                {
                    result = new Any(new Type(Boolean.class), Boolean.TRUE);
                }
                else
                {
                    result = new Any(new Type(Boolean.class), Boolean.FALSE);
                }
            }
            catch (Exception e)
            {
                result =  new Any(new Type(Boolean.class), Boolean.FALSE);
                                                                               
                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error deleting parcel: " + e.getMessage());
            }
        }
        else if (aFunctionName.equals("Renamable"))
        {
            String newName = null;
            try
            {

                if (aParams == null || aParams.length < 1 ||
                    AnyConverter.isString(aParams[0]) == false)
                {
                    String prompt = "Enter new name for Library";
                    String title = "Rename Library";
                                                                               
                    // try to get a DialogFactory instance, if it fails
                    // just use a Swing JOptionPane to prompt for the name
                    try
                    {
                        DialogFactory dialogFactory =
                            DialogFactory.getDialogFactory();
                                                                               
                        newName = dialogFactory.showInputDialog(title, prompt);
                    }
                    catch (Exception e)
                    {
                        newName = JOptionPane.showInputDialog(null, prompt, title,
                            JOptionPane.QUESTION_MESSAGE);
                    }
                }
                else {
                    newName = (String) AnyConverter.toString(aParams[0]);
                }
                container.renameParcel( getName(), newName );
                Parcel p = (Parcel)container.getByName( newName );
                if(browsenodes == null )
                {
                    getChildNodes();
                }
                ScriptBrowseNode[] childNodes = (ScriptBrowseNode[])browsenodes.toArray(new ScriptBrowseNode[0]);
View Full Code Here

Examples of com.sun.star.script.framework.container.Parcel

                    String languageName = newName + "." + provider.getScriptEditor().getExtension();
                    String language = container.getLanguage();

                    ScriptEntry entry = new ScriptEntry( language, languageName, languageName, "", new HashMap() );

                    Parcel parcel = (Parcel)container.getByName( getName() );
                    ScriptMetaData data = new ScriptMetaData( parcel, entry, source );
                    parcel.insertByName( languageName, data );

                    ScriptBrowseNode sbn = new ScriptBrowseNode( provider, parcel, languageName );

          if(browsenodes==null)
          {
              LogUtils.DEBUG("browsenodes null!!");
              browsenodes = new ArrayList(4);
          }
                    browsenodes.add(sbn);
                                                                               
                    result = new Any(new Type(XBrowseNode.class), sbn);
                }
            }
            catch (Exception e)
            {
    LogUtils.DEBUG("ParcelBrowseNode[create] failed with: " + e );
                LogUtils.DEBUG( LogUtils.getTrace( e ) );
                result = new Any(new Type(Boolean.class), Boolean.FALSE);

                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error creating script: " + e.getMessage());
            }
        }
        else if (aFunctionName.equals("Deletable"))
        {
            try
            {
                if ( container.deleteParcel(getName()) )
                {
                    result = new Any(new Type(Boolean.class), Boolean.TRUE);
                }
                else
                {
                    result = new Any(new Type(Boolean.class), Boolean.FALSE);
                }
            }
            catch (Exception e)
            {
                result =  new Any(new Type(Boolean.class), Boolean.FALSE);
                                                                               
                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error deleting parcel: " + e.getMessage());
            }
        }
        else if (aFunctionName.equals("Renamable"))
        {
            String newName = null;
            try
            {

                if (aParams == null || aParams.length < 1 ||
                    AnyConverter.isString(aParams[0]) == false)
                {
                    String prompt = "Enter new name for Library";
                    String title = "Rename Library";
                                                                               
                    // try to get a DialogFactory instance, if it fails
                    // just use a Swing JOptionPane to prompt for the name
                    try
                    {
                        DialogFactory dialogFactory =
                            DialogFactory.getDialogFactory();
                                                                               
                        newName = dialogFactory.showInputDialog(title, prompt);
                    }
                    catch (Exception e)
                    {
                        newName = JOptionPane.showInputDialog(null, prompt, title,
                            JOptionPane.QUESTION_MESSAGE);
                    }
                }
                else {
                    newName = (String) AnyConverter.toString(aParams[0]);
                }
                container.renameParcel( getName(), newName );
                Parcel p = (Parcel)container.getByName( newName );
                if(browsenodes == null )
                {
                    getChildNodes();
                }
                ScriptBrowseNode[] childNodes = (ScriptBrowseNode[])browsenodes.toArray(new ScriptBrowseNode[0]);
View Full Code Here

Examples of com.sun.star.script.framework.container.Parcel

                    String languageName = newName + "." + provider.getScriptEditor().getExtension();
                    String language = container.getLanguage();

                    ScriptEntry entry = new ScriptEntry( language, languageName, languageName, "", new HashMap() );

                    Parcel parcel = (Parcel)container.getByName( getName() );
                    ScriptMetaData data = new ScriptMetaData( parcel, entry, source );
                    parcel.insertByName( languageName, data );

                    ScriptBrowseNode sbn = new ScriptBrowseNode( provider, parcel, languageName );

          if(browsenodes==null)
          {
              LogUtils.DEBUG("browsenodes null!!");
              browsenodes = new ArrayList(4);
          }
                    browsenodes.add(sbn);
                                                                               
                    result = new Any(new Type(XBrowseNode.class), sbn);
                }
            }
            catch (Exception e)
            {
    LogUtils.DEBUG("ParcelBrowseNode[create] failed with: " + e );
                LogUtils.DEBUG( LogUtils.getTrace( e ) );
                result = new Any(new Type(Boolean.class), Boolean.FALSE);

                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error creating script: " + e.getMessage());
            }
        }
        else if (aFunctionName.equals("Deletable"))
        {
            try
            {
                if ( container.deleteParcel(getName()) )
                {
                    result = new Any(new Type(Boolean.class), Boolean.TRUE);
                }
                else
                {
                    result = new Any(new Type(Boolean.class), Boolean.FALSE);
                }
            }
            catch (Exception e)
            {
                result =  new Any(new Type(Boolean.class), Boolean.FALSE);
                                                                               
                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error deleting parcel: " + e.getMessage());
            }
        }
        else if (aFunctionName.equals("Renamable"))
        {
            String newName = null;
            try
            {

                if (aParams == null || aParams.length < 1 ||
                    AnyConverter.isString(aParams[0]) == false)
                {
                    String prompt = "Enter new name for Library";
                    String title = "Rename Library";
                                                                               
                    // try to get a DialogFactory instance, if it fails
                    // just use a Swing JOptionPane to prompt for the name
                    try
                    {
                        DialogFactory dialogFactory =
                            DialogFactory.getDialogFactory();
                                                                               
                        newName = dialogFactory.showInputDialog(title, prompt);
                    }
                    catch (Exception e)
                    {
                        newName = JOptionPane.showInputDialog(null, prompt, title,
                            JOptionPane.QUESTION_MESSAGE);
                    }
                }
                else {
                    newName = (String) AnyConverter.toString(aParams[0]);
                }
                container.renameParcel( getName(), newName );
                Parcel p = (Parcel)container.getByName( newName );
                if(browsenodes == null )
                {
                    getChildNodes();
                }
                ScriptBrowseNode[] childNodes = (ScriptBrowseNode[])browsenodes.toArray(new ScriptBrowseNode[0]);
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.util.Parcel

  /**
   * get available terminologies
   * @return
   */
  public String [] getAvailableTerminologies(){
    Set terms = (Set) sender.sendObject(new Parcel("get_terminologies",null));
    return (String []) terms.toArray(new String [0]);
  }
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.util.Parcel

  /**
   * get related concepts
   */
  public Concept[] getRelatedConcepts(Concept c, Relation r) {
    Concept [] result = (Concept []) sender.sendObject(filter(new Parcel("get_related_concepts",new Object[]{c,r})));
    for(Concept co: result)
      co.setTerminology(this);
    return result;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.