Package org.jasig.portal

Examples of org.jasig.portal.EntityTypes$EntityType


     * @param type
     * @return String
     */
    public EntityList getDependencies(String type) {
        try {
            EntityType entityType = EntityType.valueOf(type.toUpperCase());
            Collection<String> entityNames = configStore.getEntities(entityType);
            if (entityNames == null || entityNames.equals("")) {
                return new EntityList(new Entity[] {});
            }
            Entity[] entities = new Entity[entityNames.size()];
View Full Code Here


     * @param entityName
     * @return String
     */
    public String getEntityDefinition(String type, String entityName) {
        try {
            EntityType entityType = EntityType.valueOf(type.toUpperCase());
            Entity entity = configStore.get(entityType, entityName);
            if (entity == null) {
                throw new NoSuchElementException(entityName + " (" + type + ") not found");
            }
            return entity.toString();
View Full Code Here

            throw IvoryWebException.newException(e, Response.Status.BAD_REQUEST);
        }
    }

    private void checkSchedulableEntity(String type) throws UnschedulableEntityException {
        EntityType entityType = EntityType.valueOf(type.toUpperCase());
        if (!entityType.isSchedulable()) {
            throw new UnschedulableEntityException("Entity type (" + type + ") " + " cannot be Scheduled/Suspended/Resumed");
        }
    }
View Full Code Here

    protected void checkType(String type) {
        if (StringUtils.isEmpty(type)) {
            throw IvoryWebException.newInstanceException("entity type is empty",
                    Response.Status.BAD_REQUEST);
        } else {
            EntityType entityType = EntityType.valueOf(type.toUpperCase());
            if (entityType == EntityType.CLUSTER) {
                throw IvoryWebException.newInstanceException("Instance management functions don't apply to Cluster entities",
                        Response.Status.BAD_REQUEST);
            }
        }
View Full Code Here

    }
    return entity;       
  }

  public static <T extends Entity> T getEntity(String type, String entityName) throws IvoryException {
    EntityType entityType;
    try {
      entityType = EntityType.valueOf(type.toUpperCase());
    } catch (IllegalArgumentException e) {
      throw new IvoryException("Invalid entity type: " + type, e);
    }
View Full Code Here

  }

  @Override
  public void process(EntityContainer entityContainer) {
    Entity entity = entityContainer.getEntity();
    EntityType type = entity.getType();
    workerPool.submit(entity);
    entityCounter.increment(type);
  }
View Full Code Here

  @Override
  public List<ChangeContainer> next() {
    List<ChangeContainer> changeList;
    Entity peekEntity;
    long currentId;
    EntityType currentEntityType;
   
    // Get the next change from the underlying stream.
    peekEntity = sourceIterator.peekNext().getEntityContainer().getEntity();
    currentId = peekEntity.getId();
    currentEntityType = peekEntity.getType();
   
    // Loop until all history values for the current element are exhausted.
    changeList = new ArrayList<ChangeContainer>();
    while (sourceIterator.hasNext()) {
      ChangeContainer tmpChangeContainer = sourceIterator.peekNext();
     
      // Break out of the loop when we reach the next entity in the stream.
      if (currentId != tmpChangeContainer.getEntityContainer().getEntity().getId()
        || !currentEntityType.equals(tmpChangeContainer.getEntityContainer().getEntity().getType())) {
        break;
      }
     
      // We want the value that we have already peeked from the iterator, so remove it from the iterator.
      sourceIterator.next();
View Full Code Here

    Relation relation;
   
    relation = relationContainer.getEntity();
   
    for (RelationMember relationMember : relation.getMembers()) {
      EntityType memberType;
     
      memberType = relationMember.getMemberType();
     
      if (EntityType.Node.equals(memberType)) {
        if (!nodeBitSet.get(relationMember.getMemberId())) {
View Full Code Here

    return way;
  }
 
  private RelationMember readRelationMember() throws Exception {
    long id;
    EntityType type;
    String role;
   
    id = Long.parseLong(reader.getAttributeValue(null, ATTRIBUTE_NAME_REF));
    type = memberTypeParser.parse(reader.getAttributeValue(null, ATTRIBUTE_NAME_TYPE));
    role = reader.getAttributeValue(null, ATTRIBUTE_NAME_ROLE);
View Full Code Here

    // the previous one.
    long memberId = 0;
    while (memberIdIterator.hasNext()) {
      MemberType memberType = memberTypeIterator.next();
      memberId += memberIdIterator.next();
      EntityType entityType;
      RelationMember member;

      if (memberType == MemberType.NODE) {
        entityType = EntityType.Node;
      } else if (memberType == MemberType.WAY) {
View Full Code Here

TOP

Related Classes of org.jasig.portal.EntityTypes$EntityType

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.