Package org.infoglue.cms.entities.management

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


  public String doCleanOldVersionsForContent() throws Exception
    {
    Map<String,Integer> totalCleanedContentVersions = new HashMap<String,Integer>();
   
    ContentVO contentVOToClean = ContentController.getContentController().getContentVOWithId(contentId);
    ContentTypeDefinitionVO ctdVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(contentVOToClean.getContentTypeDefinitionId());
   
      String keepOnlyOldPublishedVersionsString = CmsPropertyHandler.getKeepOnlyOldPublishedVersionsDuringClean();
      long minimumTimeBetweenVersionsDuringClean = CmsPropertyHandler.getMinimumTimeBetweenVersionsDuringClean();
      boolean keepOnlyOldPublishedVersions = Boolean.parseBoolean(keepOnlyOldPublishedVersionsString);

    int cleanedContentVersions = ContentVersionController.getContentVersionController().cleanContentVersions(contentVOToClean, recurse, numberOfVersionsToKeep, keepOnlyOldPublishedVersions, minimumTimeBetweenVersionsDuringClean, deleteVersions);
    totalCleanedContentVersions.put(ctdVO.getName(), cleanedContentVersions);
   
    this.cleaningMap = totalCleanedContentVersions;
   
        return "input";
    }
View Full Code Here


      }
      else
      {
        Timer t = new Timer();
        
        ContentTypeDefinitionVO ctdVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName("Meta info", db);
        List<ContentTypeAttribute> attributes = (List<ContentTypeAttribute>)ContentTypeDefinitionController.getController().getContentTypeAttributes(ctdVO.getSchemaValue());
       
          StringBuffer SQL = new StringBuffer();
        if(CmsPropertyHandler.getUseShortTableNames() != null && CmsPropertyHandler.getUseShortTableNames().equalsIgnoreCase("true"))
        {
           SQL.append("CALL SQL select sn.siNoId, sn.name, sn.publishDateTime, sn.expireDateTime, sn.isBranch, sn.parentsiNoId, sn.metaInfoContentId, sn.repositoryId, sn.siNoTypeDefId, sn.creator, (select count(*) from cmSiNo sn2 where sn2.parentsiNoId = sn.siNoId) AS childCount, snv.siNoVerId, snv.stateId, snv.isProtected, snv.versionModifier, snv.modifiedDateTime, cv.languageId, ");
View Full Code Here

        WebPage webPage = null;
        if(contentVO.getContentTypeDefinitionId() != null)
        {
          try
          {
            ContentTypeDefinitionVO contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(contentVO.getContentTypeDefinitionId(), getController().getDatabase());
            logger.info("contentTypeDefinitionVO:" + contentTypeDefinitionVO.getName());
            if(contentTypeDefinitionVO.getDetailPageResolverClass() != null && !contentTypeDefinitionVO.getDetailPageResolverClass().equals(""))
            {
              ContentDetailPageResolver cdpr = (ContentDetailPageResolver)loadExtensionClass(contentTypeDefinitionVO.getDetailPageResolverClass()).newInstance();;
              logger.info("cdpr:" + cdpr.getName());
              SiteNodeVO detailSiteNodeVO = cdpr.getDetailSiteNodeVO(getController().getPrincipal(), contentVO.getId(), contentTypeDefinitionVO.getDetailPageResolverData(), getController().getDatabase());
              logger.info("detailSiteNodeVO:" + detailSiteNodeVO.getId());
              webPage = getController().getPage(detailSiteNodeVO.getId(), getController().getLanguageId(), new Integer(-1), escapeHTML, hideUnauthorizedPages);
              logger.info("webPage:" + webPage.getSiteNodeId());
            }
          }
View Full Code Here

   */
  public int doEndTag() throws JspException
  {
    try
    {
      ContentTypeDefinitionVO ctd;

      // Get the content type definition.
      if (contentType != null)
      {
        // If we have a content type already specified, use that
View Full Code Here

    this.contentId = evaluateInteger(TAG_NAME, PARAM_CONTENT_ID, contentId);
  }

  public void setContentTypeDefinitionName(final String contentTypeDefinitionName) throws JspException
  {
    ContentTypeDefinitionVO contentType;
    String evaluatedName = evaluateString(TAG_NAME,  PARAM_CONTENT_TYPE_DEFINITION_NAME, contentTypeDefinitionName);

    // Try to fetch the content type matching contentTypeDefinitionName
    try
    {
View Full Code Here

   * This method delivers a map with all unparsed content attributes
   */
  public Map getContentAttributes(Integer contentId)
  {
      Map result = new HashMap();
      ContentTypeDefinitionVO typeDefinitionVO = getContentTypeDefinitionVO(contentId);
      List contentAttributes = getContentAttributes(typeDefinitionVO.getSchemaValue());
     
      for(Iterator i=contentAttributes.iterator();i.hasNext();)
      {
          ContentTypeAttribute contentTypeAttribute = (ContentTypeAttribute) i.next();
          String name = contentTypeAttribute.getName();
View Full Code Here

   * This method delivers a map with all parsed content attributes
   */
  public Map getParsedContentAttributes(Integer contentId)
  {
      Map result = new HashMap();
      ContentTypeDefinitionVO typeDefinitionVO = getContentTypeDefinitionVO(contentId);
      List contentAttributes = getContentAttributes(typeDefinitionVO.getSchemaValue());
     
      for(Iterator i=contentAttributes.iterator();i.hasNext();)
      {
          ContentTypeAttribute contentTypeAttribute = (ContentTypeAttribute) i.next();
          String name = contentTypeAttribute.getName();
View Full Code Here

            ContentVersionVO contentVersionVO = cdc.getContentVersionVO(getDatabase(), this.siteNodeId, contentId,this.languageId, USE_LANGUAGE_FALLBACK, this.deliveryContext, this.infoGluePrincipal );
           
            Integer contentTypeDefinitionId = cdc.getContentVO(getDatabase(), contentId, deliveryContext ).getContentTypeDefinitionId();
         
            ContentTypeDefinitionVO contentTypeDefinitionVO = ctdc.getContentTypeDefinitionVOWithId( contentTypeDefinitionId, getDatabase());
            Iterator attrIterator = ctdc.getContentTypeAttributes(contentTypeDefinitionVO, true).iterator();
           
            String aText = text.replaceAll( "[^\\w]", "" );
            aText = aText.substring( 0, ( aText.length() < 8 ? aText.length() : 8 ) ).toLowerCase();
            StringBuffer uniqueId = new StringBuffer( aText );
            uniqueId.append( "_" + contentVersionVO.getId() );
            uniqueId.append( "_" + Math.abs( text.hashCode() ));
            uniqueId.append( "_" + Math.abs(contentVersionVO.getVersionValue().hashCode() ) );
            uniqueId.append( "_" + Math.abs(contentTypeDefinitionVO.getSchemaValue().hashCode() ) );
            uniqueId.append( "_" + ( renderAttributes != null ? Math.abs( renderAttributes.hashCode() ) : 4711 ) );

            AdvancedImageRenderer imageRenderer = new AdvancedImageRenderer();
            // set up the renderer
            while ( attrIterator.hasNext() )
View Full Code Here

  public List getPrincipalContentVersions(String contentTypeDefinitionName, String principalName, Date publishStartDate, Date publishEndDate, Date unpublishStartDate, Date unpublishEndDate)
  {
    try
    {
          Integer contentTypeDefinitionId = null;
      ContentTypeDefinitionVO contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName(contentTypeDefinitionName, getDatabase());
          if(contentTypeDefinitionVO != null)
            contentTypeDefinitionId = contentTypeDefinitionVO.getId();

          Set contentVersions = SearchController.getContentVersions(contentTypeDefinitionId, principalName, publishStartDate, publishEndDate, unpublishStartDate, unpublishEndDate);
     
      List result = new ArrayList();
      for(Iterator i = contentVersions.iterator(); i.hasNext(); )
View Full Code Here

      {
        logger.info("contentTypeDefinitionNamesString:" + contentTypeDefinitionNamesString);
        String[] contentTypeDefinitionNames = contentTypeDefinitionNamesString.split(",");
        for(String contentTypeDefinitionName : contentTypeDefinitionNames)
        {
          ContentTypeDefinitionVO contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName(contentTypeDefinitionName, getDatabase());
          if(contentTypeDefinitionVO != null)
          {
            logger.info("Do not throw page cache on this if it's not a content of type:" + contentTypeDefinitionVO.getName());
            deliveryContext.addUsedContent("selectiveCacheUpdateNonApplicable_contentTypeDefinitionId_" + contentTypeDefinitionVO.getId());
          }
        }
      }
      catch (Exception e)
      {
        logger.error("Could not set correct selectiveCacheUpdateNonApplicable-type: " + e.getMessage());
      }
    }
    else
      deliveryContext.addUsedContent("selectiveCacheUpdateNonApplicable");
     
    try
    {
        List contentTypeDefinitionVOList = new ArrayList();
        String[] contentTypeDefinitionNames = contentTypeDefinitionNamesString.split(",");
        for(int i=0; i<contentTypeDefinitionNames.length; i++)
        {
            ContentTypeDefinitionVO contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName(contentTypeDefinitionNames[i], getDatabase());
            if(contentTypeDefinitionVO != null)
              contentTypeDefinitionVOList.add(contentTypeDefinitionVO);
        }
     
      final CategoryConditions categoryConditions = CategoryConditions.parse(categoryConditionString, getDatabase());
View Full Code Here

TOP

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

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.