Esempio n. 1
0
 public void addClassification(final PdcClassification classification) {
   if (COMPONENT_INSTANCE_ID.equals(classification.getComponentInstanceId())
       && (CONTENT_ID.equals(classification.getContentId()))) {
     this.positions.clear();
     for (ClassifyPosition position : classification.getClassifyPositions()) {
       addPosition(position);
     }
   }
 }
Esempio n. 2
0
 public PdcClassification getClassification(String contentId, String inComponentId) {
   PdcClassification classification = null;
   if (COMPONENT_INSTANCE_ID.equals(inComponentId)
       && CONTENT_ID.equals(contentId)
       && !positions.isEmpty()) {
     classification =
         aClassificationFromPositions(positions)
             .ofContent(contentId)
             .inComponentInstance(inComponentId);
   }
   return classification;
 }
Esempio n. 3
0
 private void assertContentExists(String contentId, String inComponentId) throws PdcException {
   if (!COMPONENT_INSTANCE_ID.equals(inComponentId) || !CONTENT_ID.equals(contentId)) {
     throw new PdcException(getClass().getSimpleName(), SilverTrace.TRACE_LEVEL_ERROR, "");
   }
 }