private void removeModulesFromParent(Module parentModule, Collection<Module> subModulesToRemove) { parentModule.removeSubModules(subModulesToRemove); for (Module module : subModulesToRemove) { if (module instanceof BeanModule) { ((BeanModule) module).setModuleObject(null); } else if (module instanceof BeanCollectionModule) { ((BeanCollectionModule) module).setModuleObjects(null); } } } }
/** * {@inheritDoc} */ public String getCardNameForModel(Object model) { if (model instanceof BeanModule && (((BeanModule) model).getParent()) instanceof BeanCollectionModule) { return (((BeanModule) model).getParent()).getName() + ELEMENT_SUFFIX; } else if (model instanceof Module) { return ((Module) model).getName(); } return null; }
/** * Gets the modules sub-modules. * * @return the list of modules modules. */ public List<Module> getSubModules() { return getSubModules(false); }
private void removeSubModules(Module module, Collection<Module> subModulesToRemove) { if (!subModulesToRemove.isEmpty()) { module.removeSubModules(subModulesToRemove); for (Module grandSubModuleToRemove : subModulesToRemove) { ((BeanModule) grandSubModuleToRemove).setModuleObject(null); } } } }
private ISecurityHandler getSecurityHandler() { if (securityHandler != null) { return securityHandler; } if (getParent() != null) { return getParent().getSecurityHandler(); } return null; }
/** * Gets the modules modules. * * @return the list of modules belonging to this workspace. */ public List<Module> getModules() { return getModules(false); }
/** * Gets the i18nDescription. * * @return the i18nDescription. */ public String getI18nDescription() { if (i18nDescription != null) { return i18nDescription; } return getDescription(); }
/** * Mobile bean collection module views only support page views as element views * descriptors. * <p/> * {@inheritDoc} */ @Override public IMobilePageViewDescriptor getElementViewDescriptor() { return (IMobilePageViewDescriptor) super.getElementViewDescriptor(); }
/** * based on name. * <p> * {@inheritDoc} */ @Override public String toString() { if (getI18nName() != null) { return getI18nName(); } return ""; }
/** * Gets the i18nDescription. * * @return the i18nDescription. */ public String getI18nDescription() { if (i18nDescription != null) { return i18nDescription; } return getDescription(); }
/** * Gets i 18 n header description. * * @return the i 18 n header description */ public String getI18nHeaderDescription() { if (i18nHeaderDescription != null) { return i18nHeaderDescription; } return getHeaderDescription(); }
/** * {@inheritDoc} */ @Override public MobileBeanModule clone() { MobileBeanModule clone = (MobileBeanModule) super.clone(); return clone; }
/** * Gets results. * * @return the results */ @Override public List<?> getResults() { return getModuleObjects(); }
/** * Gets i 18 n page header description. * * @return the i 18 n page header description */ public String getI18nPageHeaderDescription() { if (i18nPageHeaderDescription != null) { return i18nPageHeaderDescription; } return getPageHeaderDescription(); }
/** * Gets module view descriptor. * * @param module * the module * @return the module view descriptor */ protected IViewDescriptor getModuleViewDescriptor(Module module) { return module.getViewDescriptor(); }
/** * Mobile bean collection module views only support list views as projected view * descriptors. * <p/> * {@inheritDoc} */ @Override public IListViewDescriptor getProjectedViewDescriptor() { return (IListViewDescriptor) super.getProjectedViewDescriptor(); }
/** * Constructs a new {@code FilterableBeanCollectionModule} instance. */ public FilterableBeanCollectionModule() { super(); filterComponentTracker = new FilterComponentTracker(this); }
/** * Gets i 18 n header description. * * @return the i 18 n header description */ public String getI18nPageHeaderDescription() { if (i18nPageHeaderDescription != null) { return i18nPageHeaderDescription; } return getPageHeaderDescription(); }
/** * {@inheritDoc} * * @return the bean collection module */ @Override public BeanCollectionModule clone() { BeanCollectionModule clone = (BeanCollectionModule) super.clone(); clone.moduleObjects = null; return clone; }
/** * Gets the i18nDescription. * * @return the i18nDescription. */ public String getI18nDescription() { if (i18nDescription != null) { return i18nDescription; } return getDescription(); }