NIHVIVO-2508 Preparation for exposing some template model methods as methods rather than properties. Also condensed code used to generate editing links for menu management.
This commit is contained in:
parent
44ef90bf6a
commit
c356b16807
20 changed files with 83 additions and 51 deletions
20
webapp/src/freemarker/ext/beans/WrapperExtractor.java
Normal file
20
webapp/src/freemarker/ext/beans/WrapperExtractor.java
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package freemarker.ext.beans;
|
||||
|
||||
import freemarker.template.TemplateModel;
|
||||
|
||||
/**
|
||||
* Class to extract information about the wrapper used to wrap an object in
|
||||
* the template model.
|
||||
*/
|
||||
public class WrapperExtractor {
|
||||
|
||||
public static BeansWrapper getWrapper(BeanModel model) {
|
||||
return model.wrapper;
|
||||
}
|
||||
|
||||
public static int getWrapperExposureLevel(BeanModel model) {
|
||||
return model.wrapper.getExposureLevel();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue