Examples of BaseModel


Examples of org.apache.taglibs.rdc.core.BaseModel

      }
      groupState = Constants.GRP_ALL_CHILDREN_DONE;
      log.info("Null ID of identified target");
      return;
    }
    BaseModel model = (BaseModel) children.get(id);
    if (model != null) {
      if (groupState != Constants.GRP_SOME_CHILD_RUNNING) {
        groupState = Constants.GRP_SOME_CHILD_RUNNING;
      }
      if (activeChildren.size() > 0) {
        activeChildren.remove(0);
      }
      activeChildren.add(id);
      if (model instanceof BaseModel) {
        model.setState(Constants.FSM_INPUT);
      } else if (model instanceof GroupModel) {
        model.setState(Constants.GRP_STATE_RUNNING);
      } else if (model instanceof ComponentModel) {
        model.setState(Constants.FSM_INPUT);
      }
    } else {
      // Invalid child ID specified in XML navigation rules
      // Abort group execution -- return values collected
      // upto this point
View Full Code Here

Examples of org.apache.taglibs.rdc.core.BaseModel

      return;
    }

    Iterator iter = children.keySet().iterator();
    String current;
    BaseModel model = null;

    //Loop while there are elements in the list
    while (iter.hasNext()) {
      current = (String) iter.next();
      if (current.equals(Constants.STR_INIT_ONLY_FLAG)) {
        continue;
      }

      model = (BaseModel) children.get(current);
      if (model != null) {
        model.setState(state);
      }
    }
  }
View Full Code Here

Examples of org.apache.taglibs.rdc.core.BaseModel

      return;
    }

    Iterator iter = children.keySet().iterator();
    String current;
    BaseModel model = null;
    String setterName = "set" + propertyName.substring(0,1).toUpperCase() +
      ((propertyName.length() > 1) ? propertyName.substring(1) :
      Constants.STR_EMPTY);
    Class[] argClasses = { value.getClass() };
    Object[] args = { value };

    //Loop while there are elements in the list
    while (iter.hasNext()) {
      current = (String) iter.next();
      if (current.equals(Constants.STR_INIT_ONLY_FLAG)) {
        continue;
      }

      model = (BaseModel) children.get(current);
      if (model != null) {
        Class modelClass = model.getClass();
        try
          Method setter = modelClass.getMethod(setterName,
            argClasses);
          setter.invoke((Object)model, args);
        } catch (Exception e) {
          MessageFormat msgFormat =
            new MessageFormat(ERR_SET_PROPERTY);
              log.error(msgFormat.format(new Object[] {propertyName,
                model.getId(), e.getMessage()}));
        }
      }
    }
  }
View Full Code Here

Examples of org.growersnation.site.model.view.BaseModel

   */
  @GET
  @Path("/logout")
  public Response logout() {

    BaseModel model = modelBuilder.newBaseModel(httpHeaders);
    User user = model.getUser();
    if (user != null) {
      // Invalidate the session token
      user.setSessionToken(null);
      userDao.saveOrUpdate(user);
      model.setUser(null);
    }

    View view = new PublicFreemarkerView<BaseModel>("common/home.ftl", model);

    // Remove the session token which will have the effect of logout
View Full Code Here

Examples of org.growersnation.site.model.view.BaseModel

          user = userOptional.get();
        }

        // Create a suitable view for the response
        // The session token has changed so we create the base model directly
        BaseModel model = new BaseModel();
        model.setUser(user);

        // Authenticated
        View view = new PrivateFreemarkerView<BaseModel>("private/home.ftl", model);

        // Refresh the session token cookie
View Full Code Here

Examples of org.growersnation.site.model.view.BaseModel

  /**
   * @return A new base model with user populated from the session token if present
   */
  public BaseModel newBaseModel(HttpHeaders httpHeaders) {

    BaseModel baseModel = new BaseModel();

    // Locate and populate the user by their session token (if present)
    Optional<UUID> sessionToken = extractSessionToken(httpHeaders);
    if (sessionToken.isPresent()) {
      Optional<User> user = userDao.getBySessionToken(sessionToken.get());
      if (user.isPresent()) {
        baseModel.setUser(user.get());
      }
    }

    return baseModel;

View Full Code Here

Examples of pneumaticCraft.client.model.BaseModel

        registerBaseModelRenderer(Blockss.assemblyDrill, TileEntityAssemblyDrill.class, new ModelAssemblyDrill());
        registerBaseModelRenderer(Blockss.assemblyIOUnit, TileEntityAssemblyIOUnit.class, new ModelAssemblyIOUnit());
        registerBaseModelRenderer(Blockss.assemblyLaser, TileEntityAssemblyLaser.class, new ModelAssemblyLaser());
        registerBaseModelRenderer(Blockss.assemblyPlatform, TileEntityAssemblyPlatform.class, new ModelAssemblyPlatform());
        registerBaseModelRenderer(Blockss.chargingStation, TileEntityChargingStation.class, new ModelChargingStation());
        registerBaseModelRenderer(Blockss.creativeCompressor, TileEntityCreativeCompressor.class, new BaseModel("creativeCompressor.obj"));
        registerBaseModelRenderer(Blockss.electrostaticCompressor, TileEntityElectrostaticCompressor.class, new BaseModel("electrostaticCompressor.obj"));
        registerBaseModelRenderer(Blockss.elevatorBase, TileEntityElevatorBase.class, new ModelElevatorBase());
        registerBaseModelRenderer(Blockss.elevatorFrame, TileEntityElevatorFrame.class, new ModelElevatorFrame());
        registerBaseModelRenderer(Blockss.pneumaticDoor, TileEntityPneumaticDoor.class, new ModelPneumaticDoor());
        registerBaseModelRenderer(Blockss.pneumaticDoorBase, TileEntityPneumaticDoorBase.class, new ModelPneumaticDoorBase());
        registerBaseModelRenderer(Blockss.pressureChamberInterface, TileEntityPressureChamberInterface.class, new ModelPressureChamberInterface());
View Full Code Here

Examples of uk.co.froot.demo.openid.model.BaseModel

   */
  @GET
  @Path("/logout")
  public Response logout() {

    BaseModel model = modelBuilder.newBaseModel(httpHeaders);
    User user = model.getUser();
    if (user != null) {
      // Invalidate the session token
      user.setSessionToken(null);
      // (We'll delete the user but really this would just be an update)
      InMemoryUserCache.INSTANCE.hardDelete(user);
      model.setUser(null);
    }

    View view = new PublicFreemarkerView<BaseModel>("openid/logout.ftl", model);

    // Remove the session token which will have the effect of logout
View Full Code Here

Examples of uk.co.froot.demo.openid.model.BaseModel

        user.setSessionToken(sessionToken);
        InMemoryUserCache.INSTANCE.put(sessionToken, user);

        // Create a suitable view for the response
        // The session token has changed so we create the base model directly
        BaseModel model = new BaseModel();
        model.setUser(user);

        // Authenticated
        View view = new PublicFreemarkerView<BaseModel>("private/home.ftl", model);

        // Refresh the session token cookie
View Full Code Here

Examples of uk.co.froot.demo.openid.model.BaseModel

   */
  protected BaseModel newBaseModel() {

    // Populate the model

    return new BaseModel();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.