Bug 1001435 - Move content spec constants (like "Title") to common library
Move content spec constants (like "Title") to common library
Product: PressGang CCMS
Classification: Community
Component: CSProcessor (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lee Newson
Matthew Casperson
Depends On:
  Show dependency treegraph
Reported: 2013-08-27 00:20 EDT by Matthew Casperson
Modified: 2014-08-04 18:27 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-09 01:17:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthew Casperson 2013-08-27 00:20:34 EDT
Using the content spec REST entities often involves looking up specific metadata nodes. It would be nice if the constant metadata nodes had names in a common library like RESTv1Constants so we could write code like

String title = "";
for (final RESTCSNodeCollectionItemV1 csNode : spec.getItem().getChildren_OTM().getItems()) {
    if (csNode.getItem().getNodeType() == RESTCSNodeTypeV1.META_DATA &&
            csNode.getItem().getTitle().equals(RESTv1Constants.CONTENT_SPEC_METADATA_TITLE)) {
        title = csNode.getItem().getAdditionalText();
Comment 3 Lee Newson 2013-08-27 22:37:13 EDT
Moved the MetaData constants to the CommonConstants class. See https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/commit/f0895164aae9dac22b86cd8582d3aa33a23be33c

Note You need to log in before you can comment on or make changes to this bug.