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(); break; } }
Just for reference they are currently stored here: https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/devel/src/main/java/org/jboss/pressgang/ccms/contentspec/constants/CSConstants.java#L124
Sorry heres a more permanent link: https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/0f88b1fc37238974202e52258fab93a9308572e1/src/main/java/org/jboss/pressgang/ccms/contentspec/constants/CSConstants.java#L124
Moved the MetaData constants to the CommonConstants class. See https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/commit/f0895164aae9dac22b86cd8582d3aa33a23be33c