Ejemplo n.º 1
0
  public SDMSGroup create(SystemEnvironment env, String p_name, Long p_deleteVersion)
      throws SDMSException {
    Long p_creatorUId = env.cEnv.uid();
    Long p_createTs = env.txTime();
    Long p_changerUId = env.cEnv.uid();
    Long p_changeTs = env.txTime();

    if (env.tx.mode == SDMSTransaction.READONLY) {

      throw new FatalException(new SDMSMessage(env, "01110182049", "Group"));
    }
    validate(env, p_name, p_deleteVersion, p_creatorUId, p_createTs, p_changerUId, p_changeTs);

    env.tx.beginSubTransaction(env);
    SDMSGroupGeneric o =
        new SDMSGroupGeneric(
            env, p_name, p_deleteVersion, p_creatorUId, p_createTs, p_changerUId, p_changeTs);

    SDMSGroup p;
    try {
      env.tx.addToChangeSet(env, o.versions, true);
      env.tx.addToTouchSet(env, o.versions, true);
      table.put(env, o.id, o.versions);
      env.tx.commitSubTransaction(env);
      p = (SDMSGroup) (o.toProxy());
      p.current = true;
    } catch (SDMSException e) {
      p = (SDMSGroup) (o.toProxy());
      p.current = true;
      env.tx.rollbackSubTransaction(env);
      throw e;
    }

    if (!checkCreatePrivs(env, p))
      throw new AccessViolationException(p.accessViolationMessage(env, "01402270738"));

    return p;
  }
Ejemplo n.º 2
0
  public void go(SystemEnvironment sysEnv) throws SDMSException {
    sysEnv.checkFeatureAvailability(SystemEnvironment.S_OBJECT_MONITOR);
    SDMSOutputContainer d_container = null;
    Vector desc = new Vector();

    desc.add("ID");
    desc.add("NAME");
    desc.add("PRIVS");

    d_container = new SDMSOutputContainer(sysEnv, "List of Watch Types", desc);

    Collections.sort(d_container.dataset, d_container.getComparator(sysEnv, 1));

    result.setOutputContainer(d_container);

    result.setFeedback(
        new SDMSMessage(
            sysEnv, "02108241006", "$1 Watch Type(s) found", new Integer(d_container.lines)));
  }
Ejemplo n.º 3
0
  public void go(SystemEnvironment sysEnv) throws SDMSException {
    sysEnv.checkFeatureAvailability(SystemEnvironment.S_OBJECT_MONITOR);

    result.setFeedback(new SDMSMessage(sysEnv, "02108241608", "Object Type created"));
  }