Commit 83def725 by s_guodong

update

parent 890cb66e
package com.brilliance.mda.runtime.mda.impl;
import com.brilliance.mda.runtime.mda.*;
import com.brilliance.mda.runtime.mda.IBaseObject;
import com.brilliance.mda.runtime.mda.IContext;
import com.brilliance.mda.runtime.mda.IModule;
import com.brilliance.mda.runtime.mda.IRule;
import com.brilliance.mda.runtime.mda.util.RuleUtils;
import org.apache.poi.poifs.macros.Module;
import java.util.ArrayList;
import java.util.List;
......@@ -15,7 +17,9 @@ import java.util.List;
public abstract class AbstractBaseObject implements IBaseObject {
protected transient List<IRule> defaultRules = null;
protected transient IParent parent;
// protected transient IParent parent;
protected transient IModule parent;
protected transient long key = -1L;
......@@ -27,7 +31,7 @@ public abstract class AbstractBaseObject implements IBaseObject {
protected transient boolean disposed = false;
public AbstractBaseObject(IParent parent) {
public AbstractBaseObject(IModule parent) {
this.parent = parent;
}
......@@ -43,7 +47,8 @@ public abstract class AbstractBaseObject implements IBaseObject {
this.disposed = true;
try {
finalize();
} catch (Throwable throwable) {}
} catch (Throwable throwable) {
}
}
public boolean isDisposed() {
......@@ -61,21 +66,15 @@ public abstract class AbstractBaseObject implements IBaseObject {
}
public Object setAttribute(String name, Object attribute) {
if (this instanceof IParent)
return ((IParent)this).setAttribute(this, name, attribute);
return this.parent.setAttribute(this, name, attribute);
return null;
}
public Object getAttribute(String name) {
if (this instanceof IParent)
return ((IParent)this).getAttribute(this, name);
if (this.parent == null)
System.out.println(getUrl());
return this.parent.getAttribute(this, name);
return null;
}
public IModule getParent() {
return (IModule)this.parent;
return (IModule) this.parent;
}
public String getName() {
......
......@@ -13,7 +13,7 @@ public class PanelImpl extends AbstractBaseObject implements IPanel {
private String titleI18nKey;
public PanelImpl(IParent parent, String name, String titleI18nKey) {
public PanelImpl(IModule parent, String name, String titleI18nKey) {
super(parent);
this.name = name;
this.titleI18nKey = titleI18nKey;
......@@ -24,6 +24,11 @@ public class PanelImpl extends AbstractBaseObject implements IPanel {
this.name = path;
}
public PanelImpl(IModule parent, String path) {
super(parent);
this.name = path;
}
public synchronized void dispose() {
if (IPanel.log.isTraceEnabled())
IPanel.log.trace("Panel disposing:" + this.url);
......@@ -42,7 +47,7 @@ public class PanelImpl extends AbstractBaseObject implements IPanel {
}
public IModule getModule() {
return (IModule) this.parent;
return this.parent;
}
public String getTitleI18nKey() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment