コード例 #1
0
 @Override
 public List getKeyValues() {
   KeyValuesService boService = SpringContext.getBean(KeyValuesService.class);
   Collection codes = boService.findAll(OleCategory.class);
   List labels = new ArrayList();
   labels.add(new ConcreteKeyValue("", ""));
   labels.add(new ConcreteKeyValue("percentage", OLEConstants.PERCENTAGE));
   labels.add(new ConcreteKeyValue("Hash", OLEConstants.HASH));
   return labels;
 }
  /** @see org.kuali.rice.kns.lookup.keyvalues.KeyValuesFinder#getKeyValues() */
  public List getKeyValues() {
    KeyValuesService boService = SpringContext.getBean(KeyValuesService.class);
    Collection codes = boService.findAll(ClassCodeType.class);
    List labels = new ArrayList();

    labels.add(new ConcreteKeyValue("", ""));
    for (Iterator iter = codes.iterator(); iter.hasNext(); ) {
      ClassCodeType classCodeType = (ClassCodeType) iter.next();
      labels.add(new ConcreteKeyValue(classCodeType.getCode(), classCodeType.getName()));
    }

    return labels;
  }
コード例 #3
0
  /*
   * @see org.kuali.keyvalues.KeyValuesFinder#getKeyValues()
   */
  public List getKeyValues() {

    KeyValuesService boService = SpringContext.getBean(KeyValuesService.class);
    Collection codes = boService.findAll(ShippingTitle.class);
    List labels = new ArrayList();
    labels.add(new ConcreteKeyValue("", ""));
    for (Iterator iter = codes.iterator(); iter.hasNext(); ) {
      ShippingTitle st = (ShippingTitle) iter.next();
      labels.add(
          new ConcreteKeyValue(
              st.getVendorShippingTitleCode(), st.getVendorShippingTitleDescription()));
    }

    return labels;
  }
コード例 #4
0
  /*
   * @see org.kuali.keyvalues.KeyValuesFinder#getKeyValues()
   */
  public List getKeyValues() {

    KeyValuesService boService = SpringContext.getBean(KeyValuesService.class);
    Collection codes = boService.findAll(AddressType.class);
    List labels = new ArrayList();
    labels.add(new ConcreteKeyValue("", ""));
    for (Iterator iter = codes.iterator(); iter.hasNext(); ) {
      AddressType AddressType = (AddressType) iter.next();
      labels.add(
          new ConcreteKeyValue(
              AddressType.getVendorAddressTypeCode(),
              AddressType.getVendorAddressTypeDescription()));
    }

    return labels;
  }
コード例 #5
0
 /**
  * Constructs the list of Proposal Abstract Types. Each entry in the list is a <key, value>
  * pair, where the "key" is the unique type code and the "value" is the textual description that
  * is viewed by a user. The list is obtained from the Abstract Type database table via the
  * "keyValuesService". The intent of this method is to provide a list which is viewed in a GUI. As
  * such, the first entry in the list is the generic <"", "select:"> option.
  *
  * <p>The list is also filtered based upon the abstracts currently in the proposal development
  * document. Users are not allowed to create two or more abstracts with the same abstract type.
  * Therefore, if an abstract type is already being used, it is removed from the list. If the
  * document cannot be found, the entire list is returned (it is not filtered).
  *
  * @return the list of &lt;key, value&gt; pairs of abstract types. The first entry is always
  *     &lt;"", "select:"&gt;.
  * @see org.kuali.rice.krad.keyvalues.KeyValuesFinder#getKeyValues()
  */
 @Override
 public List<KeyValue> getKeyValues() {
   ProposalDevelopmentDocument doc = (ProposalDevelopmentDocument) getDocument();
   KeyValuesService keyValuesService =
       (KeyValuesService) KraServiceLocator.getService("keyValuesService");
   Collection<AbstractType> abstractTypes = keyValuesService.findAll(AbstractType.class);
   List<KeyValue> keyValues = new ArrayList<KeyValue>();
   keyValues.add(new ConcreteKeyValue("", "select"));
   for (AbstractType abstractType : abstractTypes) {
     if (!hasAbstract(doc, abstractType)) {
       keyValues.add(
           new ConcreteKeyValue(
               abstractType.getAbstractTypeCode(), abstractType.getDescription()));
     }
   }
   return keyValues;
 }