use of com.qcadoo.view.internal.ribbon.templates.model.TemplateRibbonGroupsPack in project qcadoo by qcadoo.
the class TemplateRibbonGroupsPackTest method init.
@Before
public final void init() {
MockitoAnnotations.initMocks(this);
templateRibbonGroupsPack = new TemplateRibbonGroupsPack(template, null, viewDefinition);
}
use of com.qcadoo.view.internal.ribbon.templates.model.TemplateRibbonGroupsPack in project qcadoo by qcadoo.
the class RibbonTemplatesServiceImpl method applyTemplate.
@Override
public void applyTemplate(final InternalRibbon ribbon, final RibbonTemplateParameters parameters, final ViewDefinition viewDefinition) {
RibbonTemplate template = templates.get(getTemplateFullName(parameters.getTemplatePlugin(), parameters.getTemplateName()));
if (template == null) {
throw new IllegalStateException("ribbon template '" + parameters.getTemplatePlugin() + "." + parameters.getTemplateName() + "' not found");
}
template.parseParameters(parameters);
ribbon.addGroupsPack(new TemplateRibbonGroupsPack(template, parameters, viewDefinition));
}
Aggregations