提交 7f3906df 编写于 作者: O o2null

Merge branch 'fix/门户分类展现应用图标未获取' into 'develop'

Merge of fix/[门户]门户分类展现应用图标未获取 to develop

See merge request o2oa/o2oa!698
......@@ -66,7 +66,7 @@ class ActionListSummaryWithPortalCategory extends BaseAction {
private static final long serialVersionUID = 4546727999450453639L;
static WrapCopier<Portal, Wo> copier = WrapCopierFactory.wo(Portal.class, Wo.class,
JpaObject.singularAttributeField(Portal.class, true, true), null);
JpaObject.singularAttributeField(Portal.class, true, false), null);
private List<WoPage> pageList = new ArrayList<>();
......
package com.x.portal.assemble.designer;
import com.x.base.core.container.EntityManagerContainer;
public abstract class AbstractFactory {
private Business business;
public AbstractFactory(Business business) throws Exception {
try {
if (null == business) {
throw new Exception("business can not be null.");
}
this.business = business;
} catch (Exception e) {
throw new Exception("can not instantiating factory.");
}
}
public EntityManagerContainer entityManagerContainer() throws Exception {
return this.business.entityManagerContainer();
}
public Business business() throws Exception {
return this.business;
}
}
package com.x.portal.assemble.designer;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import com.x.base.core.project.Context;
@WebListener
public class ApplicationServletContextListener implements ServletContextListener {
@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {
try {
ThisApplication.context = Context.concrete(servletContextEvent);
ThisApplication.init();
ThisApplication.context().regist();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void contextDestroyed(ServletContextEvent servletContextEvent) {
try {
ThisApplication.destroy();
ThisApplication.context.destrory(servletContextEvent);
} catch (Exception e) {
e.printStackTrace();
}
}
}
\ No newline at end of file
package com.x.portal.assemble.designer;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.project.http.EffectivePerson;
import com.x.base.core.project.organization.OrganizationDefinition;
import com.x.organization.core.express.Organization;
import com.x.portal.assemble.designer.factory.FileFactory;
import com.x.portal.assemble.designer.factory.PageFactory;
import com.x.portal.assemble.designer.factory.PortalFactory;
import com.x.portal.assemble.designer.factory.ScriptFactory;
import com.x.portal.assemble.designer.factory.TemplatePageFactory;
import com.x.portal.assemble.designer.factory.WidgetFactory;
import com.x.portal.core.entity.Portal;
public class Business {
private EntityManagerContainer emc;
public Business(EntityManagerContainer emc) throws Exception {
this.emc = emc;
}
public EntityManagerContainer entityManagerContainer() {
return this.emc;
}
public boolean isPortalManager(EffectivePerson effectivePerson) throws Exception {
if (effectivePerson.isManager()
|| (this.organization().person().hasRole(effectivePerson, OrganizationDefinition.PortalManager))) {
return true;
}
return false;
}
private Organization organization;
public Organization organization() throws Exception {
if (null == this.organization) {
this.organization = new Organization(ThisApplication.context());
}
return organization;
}
private PortalFactory portal;
public PortalFactory portal() throws Exception {
if (null == this.portal) {
this.portal = new PortalFactory(this);
}
return portal;
}
private WidgetFactory widget;
public WidgetFactory widget() throws Exception {
if (null == this.widget) {
this.widget = new WidgetFactory(this);
}
return widget;
}
private PageFactory page;
public PageFactory page() throws Exception {
if (null == this.page) {
this.page = new PageFactory(this);
}
return page;
}
private ScriptFactory script;
public ScriptFactory script() throws Exception {
if (null == this.script) {
this.script = new ScriptFactory(this);
}
return script;
}
private FileFactory file;
public FileFactory file() throws Exception {
if (null == this.file) {
this.file = new FileFactory(this);
}
return file;
}
private TemplatePageFactory templatePage;
public TemplatePageFactory templatePage() throws Exception {
if (null == this.templatePage) {
this.templatePage = new TemplatePageFactory(this);
}
return templatePage;
}
public boolean editable(EffectivePerson effectivePerson, Portal o) throws Exception {
boolean result = false;
if (effectivePerson.isManager()
|| (this.organization().person().hasRole(effectivePerson, OrganizationDefinition.PortalManager))) {
result = true;
}
if (!result && (null != o)) {
if (effectivePerson.isPerson(o.getControllerList()) || effectivePerson.isPerson(o.getCreatorPerson())) {
result = true;
}
}
return result;
}
}
\ No newline at end of file
package com.x.portal.assemble.designer;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.gson.GsonPropertyObject;
public class ComparePortal extends GsonPropertyObject {
@FieldDescribe("导入名称")
private String name;
@FieldDescribe("导入id")
private String id;
@FieldDescribe("导入别名")
private String alias;
@FieldDescribe("是否已经存在")
private Boolean exist;
@FieldDescribe("已经存在名称")
private String existName;
@FieldDescribe("已经存在id")
private String existId;
@FieldDescribe("已经存在别名")
private String existAlias;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public Boolean getExist() {
return exist;
}
public void setExist(Boolean exist) {
this.exist = exist;
}
public String getExistName() {
return existName;
}
public void setExistName(String existName) {
this.existName = existName;
}
public String getExistId() {
return existId;
}
public void setExistId(String existId) {
this.existId = existId;
}
public String getExistAlias() {
return existAlias;
}
public void setExistAlias(String existAlias) {
this.existAlias = existAlias;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册