示例#1
0
 @Override
 public String getLongName(final ScalarModel scalarModel) {
   final ObjectAdapterMemento adapterMemento = scalarModel.getObjectAdapterMemento();
   if (adapterMemento == null) {
     // shouldn't happen
     return null;
   }
   ObjectSpecId objectSpecId = adapterMemento.getObjectSpecId();
   final String specShortName =
       SpecUtils.getSpecificationFor(objectSpecId).getShortIdentifier();
   final String parmId =
       scalarModel
           .getParameterMemento()
           .getActionParameter()
           .getIdentifier()
           .toNameIdentityString();
   return specShortName + "-" + parmId + "-" + scalarModel.getParameterMemento().getNumber();
 }
示例#2
0
 /**
  * Overridable for submodels (eg {@link ScalarModel}) that know the type of the adapter without
  * there being one.
  */
 public ObjectSpecification getTypeOfSpecification() {
   if (adapterMemento == null) {
     return null;
   }
   return getSpecificationFor(adapterMemento.getObjectSpecId());
 }