Package org.infoglue.cms.entities.content

Examples of org.infoglue.cms.entities.content.EntityVOWithSupplementingEntityVO


    if(property != null)
    {
      List<ComponentBinding> bindings = (List<ComponentBinding>)property.get("bindings");
      Iterator<ComponentBinding> bindingsIterator = bindings.iterator();
      EntityVOWithSupplementingEntityVO entity;
      while(bindingsIterator.hasNext())
      {
        try
        {
          ComponentBinding componentBinding = bindingsIterator.next();
          entity = new EntityVOWithSupplementingEntityVO();
          Integer contentId = componentBinding.getEntityId();
          entity.setEntity(this.templateController.getContent(contentId));
          if (componentBinding instanceof SupplementedComponentBinding)
          {
            try
            {
              SupplementedComponentBinding supplementedComponentBinding = (SupplementedComponentBinding)componentBinding;
              Integer supplementingEntityId = supplementedComponentBinding.getSupplementingEntityId();
              String supplementingAssetKey = supplementedComponentBinding.getSupplementingAssetKey();
              DigitalAssetVO asset = this.templateController.getAsset(supplementingEntityId, supplementingAssetKey);
              entity.setSupplementingEntity(asset);
            }
            catch (Exception ex)
            {
              logger.warn("Error when getting asset for supplemented content.", ex);
            }
View Full Code Here


   
    if(property != null)
    {
      List<ComponentBinding> bindings = (List<ComponentBinding>)property.get("bindings");
      Iterator<ComponentBinding> bindingsIterator = bindings.iterator();
      EntityVOWithSupplementingEntityVO entity;
      while(bindingsIterator.hasNext())
      {
        try
        {
          ComponentBinding componentBinding = bindingsIterator.next();
          entity = new EntityVOWithSupplementingEntityVO();

          if ("Content".equalsIgnoreCase(componentBinding.getEntityClass()))
          {
            Integer contentId = componentBinding.getEntityId();
            entity.setEntity(this.templateController.getContent(contentId));
          }
          else if ("External".equalsIgnoreCase(componentBinding.getEntityClass()))
          {
            Integer entityId = componentBinding.getEntityId();
            entity.setEntity(new EntityVOWithSupplementingEntityVO.IdOnlyBaseEntityVO(entityId));
          }

          if (componentBinding instanceof SupplementedComponentBinding)
          {
            try
            {
              SupplementedComponentBinding supplementedComponentBinding = (SupplementedComponentBinding)componentBinding;
              Integer supplementingEntityId = supplementedComponentBinding.getSupplementingEntityId();
              String supplementingAssetKey = supplementedComponentBinding.getSupplementingAssetKey();
              DigitalAssetVO asset = this.templateController.getAsset(supplementingEntityId, supplementingAssetKey);
              entity.setSupplementingEntity(asset);
            }
            catch (Exception ex)
            {
              logger.warn("Error when getting asset for supplemented content.", ex);
            }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.content.EntityVOWithSupplementingEntityVO

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.