Exemple #1
0
  private synchronized void doAddOutboundReference(
      Meem meem, Reference reference, boolean automaticRemove) {
    if (reference.getFacetIdentifier().equals("lifeCycleClient")) {
      addLifeCycleReference(reference, automaticRemove);
    } else if (meem != null) {
      meem.addOutboundReference(reference, automaticRemove);
    } else {
      ContentClient contentClient =
          MeemSystemWedge.getContentClientFromTarget(reference.getTarget());

      contentClient.contentFailed(
          "Cannot add reference to Meem in LifeCycleState of "
              + lastTransition.getCurrentState().getCurrentState());
    }
  }
Exemple #2
0
  private void addLifeCycleReference(Reference reference, boolean automaticRemove) {
    Facet target = reference.getTarget();
    ContentClient contentClient = MeemSystemWedge.getContentClientFromTarget(target);

    if (target instanceof LifeCycleClient) {
      if (reference.isContentRequired()) {
        LifeCycleClient lifeCycleClient = (LifeCycleClient) target;
        lifeCycleClient.lifeCycleStateChanged(lastTransition);
      }

      contentClient.contentSent();

      if (!automaticRemove) {
        getLifeCycleClientRefs()
            .put(reference, (RequestStack) RequestTracker.getRequestStack().clone());
      }
    } else {
      contentClient.contentFailed("Target must be of type: " + LifeCycleClient.class);
    }

    getClient().startResolving(); // this needs to be done
  }