Ejemplo n.º 1
0
  /**
   * Retrieve the <code>AppdefResourceTypeValue</code> representing the currently selected child
   * resource type (or, if the <code>isPerformance</code> flag is not set, the default child
   * resource type, if none is currently selected).
   *
   * @param childTypes the complete List of child resource types for this entity type
   * @param childCounts the Map of child resource counts keyed by resource type
   * @param isPerformance a Boolean indicating whether or not we are currently displaying a
   *     performance page
   */
  public AppdefResourceTypeValue getSelectedChildType(
      HttpServletRequest request, List childTypes, Map childCounts, Integer selectedId) {

    if (selectedId != null) {

      for (Iterator i = childTypes.iterator(); i.hasNext(); ) {
        AppdefResourceTypeValue t = (AppdefResourceTypeValue) i.next();
        if (t.getId().intValue() == selectedId.intValue()) {
          return t;
        }
      }
    }

    return null;
  }
Ejemplo n.º 2
0
 public Integer getAppdefTypeId() {
   return _type.getId();
 }