コード例 #1
0
  @Override
  public RtcQueryAttributeValue[] getChildValues(RtcQueryAttributeValue value)
      throws IllegalArgumentException {
    assert (!EventQueue.isDispatchThread());
    ProcessManager pm = area.getLookup().lookup(ProcessManager.class);
    if (value instanceof DevelopmentLineValueImpl) {
      ArrayList<RtcQueryAttributeValue> chs = new ArrayList<RtcQueryAttributeValue>();
      DevelopmentLine line = ((DevelopmentLineValueImpl) value).getLine();

      for (Iteration impl : pm.getIterations(line)) {
        if (impl instanceof IterationImpl) {
          if (!impl.isArchived()) {
            chs.add(new IterationValueImpl((IterationImpl) impl));
          }
        }
      }
      return chs.toArray(new RtcQueryAttributeValue[] {});
    } else {
      ArrayList<RtcQueryAttributeValue> chs = new ArrayList<RtcQueryAttributeValue>();
      if (value instanceof IterationValueImpl) {
        IterationValueImpl impl = (IterationValueImpl) value;
        for (Iteration it : pm.getIterations(impl.getRtcIteration())) {
          if (it instanceof IterationImpl) {
            if (!it.isArchived()) {
              chs.add(new IterationValueImpl((IterationImpl) it));
            }
          }
        }
        return chs.toArray(new RtcQueryAttributeValue[] {});
      }
    }
    throw new IllegalArgumentException();
  }
コード例 #2
0
 @Override
 public RtcQueryAttributeValue getValueForObject(Object obj) throws IllegalArgumentException {
   if (obj instanceof IIterationHandle) {
     IIterationHandle handle = (IIterationHandle) obj;
     for (DevelopmentLineValueImpl val : getValues()) {
       for (IterationValueImpl iter : getChildValues(val)) {
         if (iter.getRtcIteration()
             .getIIteration()
             .getItemId()
             .getUuidValue()
             .equals(handle.getItemId().getUuidValue())) {
           return iter;
         }
       }
     }
   }
   throw new IllegalArgumentException();
 }