Ejemplo n.º 1
0
 /**
  * Returns the current hierarchy.
  *
  * @return
  */
 public Hierarchy getHierarchy() {
   if (type == Type.INTERVAL_BASED) {
     return intervalModel.getHierarchy();
   } else if (type == Type.REDACTION_BASED) {
     return redactionModel.getHierarchy();
   } else if (type == Type.ORDER_BASED) {
     return orderModel.getHierarchy();
   } else {
     throw new RuntimeException(Resources.getMessage("HierarchyWizardModel.1")); // $NON-NLS-1$
   }
 }
Ejemplo n.º 2
0
 /**
  * Returns the current builder.
  *
  * @param serializable
  * @return
  * @throws Exception
  */
 public HierarchyBuilder<T> getBuilder(boolean serializable) throws Exception {
   if (type == Type.INTERVAL_BASED) {
     return intervalModel.getBuilder(serializable);
   } else if (type == Type.REDACTION_BASED) {
     return redactionModel.getBuilder(serializable);
   } else if (type == Type.ORDER_BASED) {
     return orderModel.getBuilder(serializable);
   } else {
     throw new IllegalArgumentException(
         Resources.getMessage("HierarchyWizardModel.0")); // $NON-NLS-1$
   }
 }