Package org.camunda.bpm.engine.impl.persistence.entity

Examples of org.camunda.bpm.engine.impl.persistence.entity.IdentityInfoEntity


    this.userId = userId;
    this.key = key;
  }

  public String execute(CommandContext commandContext) {
    IdentityInfoEntity identityInfo = commandContext
      .getIdentityInfoManager()
      .findUserInfoByUserIdAndKey(userId, key);

    return (identityInfo!=null ? identityInfo.getValue() : null);
  }
View Full Code Here


  }

  public Picture execute(CommandContext commandContext) {
    ensureNotNull("userId", userId);

    IdentityInfoEntity pictureInfo = commandContext.getIdentityInfoManager()
      .findUserInfoByUserIdAndKey(userId, "picture");

    if (pictureInfo != null) {
      String pictureByteArrayId = pictureInfo.getValue();
      if (pictureByteArrayId != null) {
        ByteArrayEntity byteArray = commandContext.getDbEntityManager()
          .selectById(ByteArrayEntity.class, pictureByteArrayId);
        return new Picture(byteArray.getBytes(), byteArray.getName());
      }
View Full Code Here

  }

  public Void execute(CommandContext commandContext) {
    ensureNotNull("UserId", userId);

    IdentityInfoEntity infoEntity = commandContext.getIdentityInfoManager()
      .findUserInfoByUserIdAndKey(userId, "picture");
   
    if(infoEntity != null) {
      String byteArrayId = infoEntity.getValue();
      if(byteArrayId != null) {
        commandContext.getByteArrayManager()
          .deleteByteArrayById(byteArrayId);
      }
      commandContext.getIdentityInfoManager()
View Full Code Here

  }

  public Void execute(CommandContext commandContext) {
    ensureNotNull("userId", userId);

    IdentityInfoEntity pictureInfo = commandContext.getIdentityInfoManager()
      .findUserInfoByUserIdAndKey(userId, "picture");

    if (pictureInfo != null) {
      String byteArrayId = pictureInfo.getValue();
      if (byteArrayId != null) {
        commandContext.getByteArrayManager()
          .deleteByteArrayById(byteArrayId);
      }

    } else {
      pictureInfo = new IdentityInfoEntity();
      pictureInfo.setUserId(userId);
      pictureInfo.setKey("picture");
      commandContext.getDbEntityManager().insert(pictureInfo);
    }

    ByteArrayEntity byteArrayEntity = new ByteArrayEntity(picture.getMimeType(), picture.getBytes());

    commandContext.getDbEntityManager()
      .insert(byteArrayEntity);

    pictureInfo.setValue(byteArrayEntity.getId());

    return null;
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.persistence.entity.IdentityInfoEntity

Copyright © 2018 www.massapicom. 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.