Package com.redhat.topicindex.rest.entities

Examples of com.redhat.topicindex.rest.entities.PropertyTagV1


      /* look for the bugzilla options */
      if (topic.getTags() != null && topic.getTags().getItems() != null)
      {
        for (final TagV1 tag : topic.getTags().getItems())
        {
          final PropertyTagV1 bugzillaProductTag = tag.getProperty(CommonConstants.BUGZILLA_PRODUCT_PROP_TAG_ID);
          final PropertyTagV1 bugzillaComponentTag = tag.getProperty(CommonConstants.BUGZILLA_COMPONENT_PROP_TAG_ID);
          final PropertyTagV1 bugzillaKeywordsTag = tag.getProperty(CommonConstants.BUGZILLA_KEYWORDS_PROP_TAG_ID);
          final PropertyTagV1 bugzillaVersionTag = tag.getProperty(CommonConstants.BUGZILLA_VERSION_PROP_TAG_ID);
          final PropertyTagV1 bugzillaAssignedToTag = tag.getProperty(CommonConstants.BUGZILLA_PROFILE_PROPERTY);

          if (bugzillaProduct == null && bugzillaProductTag != null)
            bugzillaProduct = URLEncoder.encode(bugzillaProductTag.getValue(), "UTF-8");

          if (bugzillaComponent == null && bugzillaComponentTag != null)
            bugzillaComponent = URLEncoder.encode(bugzillaComponentTag.getValue(), "UTF-8");

          if (bugzillaKeywords == null && bugzillaKeywordsTag != null)
            bugzillaKeywords = URLEncoder.encode(bugzillaKeywordsTag.getValue(), "UTF-8");

          if (bugzillaVersion == null && bugzillaVersionTag != null)
            bugzillaVersion = URLEncoder.encode(bugzillaVersionTag.getValue(), "UTF-8");

          if (bugzillaAssignedTo == null && bugzillaAssignedToTag != null)
            bugzillaAssignedTo = URLEncoder.encode(bugzillaAssignedToTag.getValue(), "UTF-8");
        }
      }
     
     

View Full Code Here


                }
                else
                {
                  if (usedFixedUrls)
                  {
                    final PropertyTagV1 propTag = relatedTopic.getProperty(CommonConstants.FIXED_URL_PROP_TAG_ID);
                    if (propTag != null)
                    {
                      list.add(DocbookUtils.buildEmphasisPrefixedXRef(xmlDocument, OPTIONAL_LIST_PREFIX, propTag.getValue()));
                    }
                    else
                    {
                      list.add(DocbookUtils.buildEmphasisPrefixedXRef(xmlDocument, OPTIONAL_LIST_PREFIX, relatedTopic.getXRefID()));
                    }
                  }
                  else
                  {
                    list.add(DocbookUtils.buildEmphasisPrefixedXRef(xmlDocument, OPTIONAL_LIST_PREFIX, relatedTopic.getXRefID()));
                  }
                }
              }
              else
              {
                if (internal)
                {
                  list.add(DocbookUtils.buildULink(xmlDocument, url, relatedTopic.getTitle()));
                }
                else
                {
                  if (usedFixedUrls)
                  {
                    final PropertyTagV1 propTag = relatedTopic.getProperty(CommonConstants.FIXED_URL_PROP_TAG_ID);
                    if (propTag != null)
                    {
                      list.add(DocbookUtils.buildXRef(xmlDocument, propTag.getValue()));
                    }
                    else
                    {
                      list.add(DocbookUtils.buildXRef(xmlDocument, relatedTopic.getXRefID()));
                    }
View Full Code Here

                DocbookUtils.createRelatedTopicULink(xmlDoc, getURLToInternalTopic(relatedTopic.getId()), relatedTopic.getTitle(), itemizedlist);
              else
              {
                if (usedFixedUrls)
                {
                  final PropertyTagV1 propTag = relatedTopic.getProperty(CommonConstants.FIXED_URL_PROP_TAG_ID);
                  if (propTag != null)
                  {
                    DocbookUtils.createRelatedTopicXRef(xmlDoc, propTag.getValue(), itemizedlist);
                  }
                  else
                  {
                    DocbookUtils.createRelatedTopicXRef(xmlDoc, relatedTopic.getXRefID(), itemizedlist);
                  }
View Full Code Here

                }
                else
                {
                  if (usedFixedUrls)
                  {
                    final PropertyTagV1 propTag = relatedTopic.getProperty(CommonConstants.FIXED_URL_PROP_TAG_ID);
                    if (propTag != null)
                    {
                      list.add(DocbookUtils.buildEmphasisPrefixedXRef(xmlDocument, XMLPreProcessor.OPTIONAL_LIST_PREFIX, propTag.getValue()));
                    }
                    else
                    {
                      list.add(DocbookUtils.buildEmphasisPrefixedXRef(xmlDocument, XMLPreProcessor.OPTIONAL_LIST_PREFIX, relatedTopic.getXRefID()));
                    }
                  }
                  else
                  {
                    list.add(DocbookUtils.buildEmphasisPrefixedXRef(xmlDocument, XMLPreProcessor.OPTIONAL_LIST_PREFIX, relatedTopic.getXRefID()));
                  }
                }
              }
              else
              {
                if (internal)
                {
                  final TranslatedTopicDataV1 relatedTranslatedTopicData = translatedTopicData.getLatestRelatedTranslationDataByTopicID(relatedTopic.getId());
                 
                  if (relatedTranslatedTopicData != null)
                  {
                    final String url = getURLToInternalTranslatedTopic(relatedTranslatedTopicData.getTranslatedTopic().getId(), relatedTranslatedTopicData.getTranslationLocale());
                   
                    /* Get the related translated data object and the title from the XML */
                    final String relatedTitle = DocBookUtilities.findTitle(relatedTranslatedTopicData.getTranslatedXml());
                   
                    list.add(DocbookUtils.buildULink(xmlDocument, url, relatedTitle));
                  }
                  else
                  {
                    final String url = getURLToInternalTopic(relatedTopic.getId());
                   
                    final String relatedTopicTitle = "[" + relatedTopic.getLocale() + "] " + relatedTopic.getTitle() + "*";
                   
                    list.add(DocbookUtils.buildULink(xmlDocument, url, relatedTopicTitle));
                   
                    translatedTopicTitleErrors.addTitle(relatedTopic.getTitle());
                  }
                }
                else
                {
                  if (usedFixedUrls)
                  {
                    final PropertyTagV1 propTag = relatedTopic.getProperty(CommonConstants.FIXED_URL_PROP_TAG_ID);
                    if (propTag != null)
                    {
                      list.add(DocbookUtils.buildXRef(xmlDocument, propTag.getValue()));
                    }
                    else
                    {
                      list.add(DocbookUtils.buildXRef(xmlDocument, relatedTopic.getXRefID()));
                    }
View Full Code Here

              }
              else
              {
                if (usedFixedUrls)
                {
                  final PropertyTagV1 propTag = relatedTopic.getProperty(CommonConstants.FIXED_URL_PROP_TAG_ID);
                  if (propTag != null)
                  {
                    DocbookUtils.createRelatedTopicXRef(xmlDoc, propTag.getValue(), itemizedlist);
                  }
                  else
                  {
                    DocbookUtils.createRelatedTopicXRef(xmlDoc, relatedTopic.getXRefID(), itemizedlist);
                  }
View Full Code Here

TOP

Related Classes of com.redhat.topicindex.rest.entities.PropertyTagV1

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.