Package org.infoglue.cms.entities.management

Examples of org.infoglue.cms.entities.management.AvailableServiceBinding


            List availableServiceBindingList = new ArrayList();
            if(availableServiceBindingValues != null)
      {
            for (int i=0; i < availableServiceBindingValues.length; i++)
              {
                AvailableServiceBinding availableServiceBinding = AvailableServiceBindingController.getController().getAvailableServiceBindingWithId(new Integer(availableServiceBindingValues[i]), db);
                availableServiceBindingList.add(availableServiceBinding);
                //siteNodeTypeDefinition.getAvailableServiceBindings().add(availableServiceBinding);
              }
      }
     
View Full Code Here


  private AvailableServiceBinding getAvailableServiceBindingRecursive(SiteNode siteNode, String availableServiceBindingName, boolean inheritParentBindings)
  {
    if(siteNode == null || availableServiceBindingName == null)
      return null;
   
    AvailableServiceBinding availableServiceBinding = null;
   
    SiteNodeTypeDefinition siteNodeTypeDefinition = siteNode.getSiteNodeTypeDefinition();
    if(siteNodeTypeDefinition != null)
    {
      Collection availableServiceBindings = siteNodeTypeDefinition.getAvailableServiceBindings();
     
      Iterator availableServiceBindingsIterator = availableServiceBindings.iterator();
      while(availableServiceBindingsIterator.hasNext())
      {
        AvailableServiceBinding currentAvailableServiceBinding = (AvailableServiceBinding)availableServiceBindingsIterator.next();
        if(currentAvailableServiceBinding.getName().equalsIgnoreCase(availableServiceBindingName))
        {
          availableServiceBinding = currentAvailableServiceBinding;
        }
      }
    }
View Full Code Here

          oql.bind(availableServiceBindingName);
     
      QueryResults results = oql.execute(Database.READONLY);
      if (results.hasMore())
          {
            AvailableServiceBinding availableServiceBinding = (AvailableServiceBinding)results.next();
        availableServiceBindingVO = availableServiceBinding.getValueObject();
        logger.info("Found availableServiceBinding:" + availableServiceBindingVO.getName());
          }
            else
            {
                logger.info("Found no AvailableServiceBindingVO with name " + availableServiceBindingName);
View Full Code Here

   * This method returns the available service binding with a specific name.
   */
 
  public AvailableServiceBinding getAvailableServiceBinding(String availableServiceBindingName, Database db) throws SystemException, Exception
  {
      AvailableServiceBinding availableServiceBinding = null;
     
    OQLQuery oql = db.getOQLQuery( "SELECT asb FROM org.infoglue.cms.entities.management.impl.simple.AvailableServiceBindingImpl asb WHERE asb.name = $1");
      oql.bind(availableServiceBindingName);
   
    QueryResults results = oql.execute(Database.READONLY);
    if (results.hasMore())
      {
        availableServiceBinding = (AvailableServiceBinding)results.next();
      logger.info("Found availableServiceBinding:" + availableServiceBinding.getName());
      }
        
    results.close();
    oql.close();

View Full Code Here

    }

 
    public AvailableServiceBindingVO create(AvailableServiceBindingVO vo) throws ConstraintException, SystemException
    {
        AvailableServiceBinding ent = new AvailableServiceBindingImpl();
        ent.setValueObject(vo);
        ent = (AvailableServiceBinding) createEntity(ent);
        return ent.getValueObject();
    }    
View Full Code Here

        {
            beginTransaction(db);

            //AvailableServiceBinding availableServiceBinding = getAvailableServiceBindingWithId(availableServiceBindingVO.getAvailableServiceBindingId(), db);
        Collection serviceBindingList = ServiceBindingController.getController().getServiceBindingList(availableServiceBindingVO.getId(), db);
        AvailableServiceBinding availableServiceBinding = AvailableServiceBindingController.getController().getAvailableServiceBindingWithId(availableServiceBindingVO.getId(), db);
        Collection siteNodeTypeDefinitionList = availableServiceBinding.getSiteNodeTypeDefinitions();
           
        //if(availableServiceBinding.getServiceBindings() != null && availableServiceBinding.getServiceBindings().size() > 0)
        if((serviceBindingList != null && serviceBindingList.size() > 0) || (siteNodeTypeDefinitionList != null && siteNodeTypeDefinitionList.size() > 0))
        {
          throw new ConstraintException("AvailableServiceBinding.deleteAction", "3100");
View Full Code Here

        oql.bind(name);
     
      QueryResults results = oql.execute(Database.READONLY);
      if (results.hasMore())
          {
            AvailableServiceBinding availableServiceBinding = (AvailableServiceBinding)results.next();
        availableServiceBindingVO = availableServiceBinding.getValueObject();
        logger.info("Found availableServiceBinding:" + availableServiceBindingVO.getName());
          }
     
      results.close();
      oql.close();
View Full Code Here

   * @throws Bug
   */
 
  public AvailableServiceBinding getAvailableServiceBindingWithName(String name, Database db, boolean readOnly) throws SystemException, Bug
  {
    AvailableServiceBinding availableServiceBinding = null;
   
    try
    {
      //OQLQuery oql = db.getOQLQuery("SELECT asb FROM org.infoglue.cms.entities.management.impl.simple.AvailableServiceBindingImpl as asb WHERE asb.name = $1 order by asb.name LIMIT $2");
      OQLQuery oql = db.getOQLQuery("SELECT asb FROM org.infoglue.cms.entities.management.impl.simple.AvailableServiceBindingImpl as asb WHERE asb.name = $1 order by asb.name");
View Full Code Here

    public AvailableServiceBindingVO update(AvailableServiceBindingVO availableServiceBindingVO) throws ConstraintException, SystemException
    {
        Database db = CastorDatabaseService.getDatabase();
        ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();

        AvailableServiceBinding availableServiceBinding = null;

        beginTransaction(db);

        try
        {
            //add validation here if needed
            availableServiceBinding = getAvailableServiceBindingWithId(availableServiceBindingVO.getAvailableServiceBindingId(), db);
            availableServiceBinding.setValueObject(availableServiceBindingVO);

            //If any of the validations or setMethods reported an error, we throw them up now before create.
            ceb.throwIfNotEmpty();
           
            commitTransaction(db);
        }
        catch(ConstraintException ce)
        {
            logger.warn("An error occurred so we should not complete the transaction:" + ce, ce);
            rollbackTransaction(db);
            throw ce;
        }
        catch(Exception e)
        {
            logger.error("An error occurred so we should not complete the transaction:" + e, e);
            rollbackTransaction(db);
            throw new SystemException(e.getMessage());
        }


        return availableServiceBinding.getValueObject();
    }       
View Full Code Here

      return (AvailableServiceBindingVO) updateEntity(AvailableServiceBindingImpl.class, (BaseEntityVO)availableServiceBindingVO, "setServiceDefinitions", ServiceDefinitionImpl.class, values );
    }         

    public AvailableServiceBinding update(Integer availableServiceBindingId, String[] values, Database db) throws ConstraintException, SystemException
    {
        AvailableServiceBinding availableServiceBinding = getAvailableServiceBindingWithId(availableServiceBindingId, db);
      return (AvailableServiceBinding) updateEntity(AvailableServiceBindingImpl.class, (BaseEntityVO)availableServiceBinding.getVO(), "setServiceDefinitions", ServiceDefinitionImpl.class, values );
    }         
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.management.AvailableServiceBinding

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.