Beispiel #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);
     }
   }
 }
Beispiel #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;
 }
Beispiel #3
0
 private void assertComponentExists(String componentId) throws PdcException {
   if (!COMPONENT_INSTANCE_ID.equals(componentId)) {
     throw new PdcException(getClass().getSimpleName(), SilverTrace.TRACE_LEVEL_ERROR, "");
   }
 }