Package org.infoglue.cms.applications.databeans

Examples of org.infoglue.cms.applications.databeans.ComponentPropertyDefinition


   
    value = path;

    if(value == null)
    {
      ComponentPropertyDefinition propertyDefinition = getComponentPropertyDefinition(new Integer(componentContentId), name, templateController.getSiteNodeId(), languageId, templateController.getContentId(), templateController.getDatabase(), templateController.getPrincipal());
      if(propertyDefinition != null)
        value = propertyDefinition.getDefaultValue();
    }

    if(value != null)
      value = value.replaceAll("igbr", separator);
   
View Full Code Here


 
  private ComponentPropertyDefinition getComponentPropertyDefinition(Integer componentContentId, String propertyName, Integer siteNodeId, Integer languageId, Integer contentId, Database db, InfoGluePrincipal principal) throws Exception
  {
    //TODO - h�r kan vi s�kert cache:a.
   
    ComponentPropertyDefinition propertyDefinition = null;
   
    Timer timer = new Timer();
    timer.setActive(false);

    try
    {
      pageEditorHelper.setTemplateController(this.templateController);
      org.dom4j.Document document = pageEditorHelper.getComponentPropertiesDOM4JDocument(siteNodeId, languageId, componentContentId, db, principal);
      if(document != null)
      {
        timer.printElapsedTime("Read document");

        String propertyXPath = "//property[@name='" + propertyName + "']";
        org.dom4j.Node node = document.selectSingleNode(propertyXPath);
        timer.printElapsedTime("Set property xpath");
        if(node != null)
        {
          org.dom4j.Element element = (org.dom4j.Element)node;
                     
          String name            = element.attributeValue("name");
          String displayName        = element.attributeValue("displayName");
          String type             = element.attributeValue("type");
          String entity          = element.attributeValue("entity");
          String multiple          = element.attributeValue("multiple");
          String assetBinding       = element.attributeValue("assetBinding");
          String assetMask        = element.attributeValue("assetMask");
          String isPuffContentForPage   = element.attributeValue("isPuffContentForPage");
          String allowedContTypeDefNames  = element.attributeValue("allowedContentTypeDefinitionNames");
          String description         = element.attributeValue("description");
          String defaultValue       = element.attributeValue("defaultValue");
          String allowLanguageVariations   = element.attributeValue("allowLanguageVariations");
          String dataProvider       = element.attributeValue("dataProvider");
          String dataProviderParameters   = element.attributeValue("dataProviderParameters");
          String allowMultipleSelections   = element.attributeValue("allowMultipleSelections");
          String WYSIWYGEnabled       = element.attributeValue("WYSIWYGEnabled");
          String WYSIWYGToolbar       = element.attributeValue("WYSIWYGToolbar");
          String autoCreatContent     = element.attributeValue("autoCreatContent");
          String autoCreatContentMethod   = element.attributeValue("autoCreatContentMethod");
          String autoCreatContentPath    = element.attributeValue("autoCreatContentPath");
          String customMarkup       = element.attributeValue("customMarkup");
          String externalBindingConfig   = element.attributeValue("externalBindingConfig");
          String supplementingEntityType  = element.attributeValue("supplementingEntityType");
          if(allowLanguageVariations == null || allowLanguageVariations.equals(""))
            allowLanguageVariations = "true";
         
          propertyDefinition = new ComponentPropertyDefinition(name, displayName, type, entity, new Boolean(multiple), new Boolean(assetBinding), assetMask, new Boolean(isPuffContentForPage), allowedContTypeDefNames, description, defaultValue, new Boolean(allowLanguageVariations), new Boolean(WYSIWYGEnabled), WYSIWYGToolbar, dataProvider, dataProviderParameters, new Boolean(autoCreatContent), autoCreatContentMethod, autoCreatContentPath, customMarkup, new Boolean(allowMultipleSelections), supplementingEntityType, externalBindingConfig);
        }
      }
    }
    catch(Exception e)
    {
View Full Code Here

TOP

Related Classes of org.infoglue.cms.applications.databeans.ComponentPropertyDefinition

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.