Skip to content

Commit

Permalink
remove registry
Browse files Browse the repository at this point in the history
  • Loading branch information
DevChu committed Oct 6, 2023
1 parent 1c68bb4 commit 8c84f53
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 443 deletions.
99 changes: 0 additions & 99 deletions bin/genmd5sign

This file was deleted.

102 changes: 0 additions & 102 deletions bin/md5java

This file was deleted.

17 changes: 1 addition & 16 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ if [ "$1" = "" ] || [ "$1" = "lessc" ] || [ "$1" = "checkstyle" ] ; then
fi

#-- parsing cmd
cmdList=" bd br cd cr ud ur doc jsrc build.debug build.release clean clean.debug clean.release utest.debug utest.release javadoc jsdoc zipjs lessc tsmin dev help checkstyle "
cmdList=" bd br cd cr ud ur doc jsrc build.debug build.release clean clean.debug clean.release utest.debug utest.release javadoc jsdoc zipjs lessc tsmin help checkstyle "
if [ \( $# != 0 \) -a \( "${cmdList#* $1 }" != "$cmdList" \) ] ; then
cmd=$1
shift
Expand Down Expand Up @@ -493,20 +493,6 @@ function invoke_ant
else
gentime=$(grep '^time=' format)
gentime=${gentime#time=}
signdir=$(grep '^signdir=' format)
signdir=${signdir#signdir=}
signclasses=$(grep '^signclasses=' format)
signclasses=${signclasses#signclasses=}
if [ "$gentime" = "" ] && [ "$signdir" != "" ] && [ "$cmd" = "build" ] ; then
buildstamp=$(grep '^buildstamp=' format)
buildstamp=${buildstamp#buildstamp=}
if [ ! -f $maindir/zk/codegen/$buildstamp ] ; then
echo "zk's build stamp is not found, please build zk first"
exit -1
fi
else
buildstamp=$gentime
fi
CLASSPATH="$DCP" ANT_OPTS=-Xmx160M ant $verbose $class_test \
$doall -Dformat="$format" -Ddeploy="$deploy" \
-Dcheckstyle.java="$checkstyleJava" -Dcheckstyle.js="$checkstyleJs" \
Expand All @@ -527,7 +513,6 @@ function invoke_ant
-Dshare.javadoc.dir="$javadocdir" \
-Djavadoc.class.path="$DCP" -Dapp.name=$app $unziplist \
-Droot.context=$rootContext -Dgentime=$gentime \
-Dsigndir=$signdir -Dsignclasses=$signclasses -Dbuildstamp=$buildstamp \
$dfnList -buildfile $maindir/build.xml $1
fi

Expand Down
24 changes: 1 addition & 23 deletions build.target.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,6 @@ if="deploy.tomcat.required">
<target name="deploy" depends="deploy.lib, deploy.osgi, deploy.tomcat">
</target>

<target name="dev" depends="config, gentime">
<delete file="${zkcmldir}/zkex/${codegen.archive.dir}/metainfo/zk/buildsign" verbose="true" failonerror="false" />
<exec executable="bash" dir="." failonerror="true">
<arg value="${bin.dir}/genmd5sign"/>
<arg value="${codegen.dir}/${signdir}"/>
<arg value="${signclasses}"/>
<arg value="${out.dir}/classes"/>
<arg value="${maindir}/zk/${codegen.dir}/${buildstamp}"/>
<arg value="${maindir}"/>
</exec>
</target>

<!-- ===== -->
<!-- BUILD -->
<!-- ===== -->
Expand Down Expand Up @@ -201,7 +189,7 @@ if="deploy.tomcat.required">
<arg value="--dest=${codegen.archive.dir}/${zipjs}"/>
</exec>
</target>
<target name="build.jar" depends="lessc, zipjs, gentime, genmd5sign, compile" if="build.jar.required">
<target name="build.jar" depends="lessc, zipjs, gentime, compile" if="build.jar.required">
<available file="${srcpv.dir}" property="jar.srcpv.dir" value="${srcpv.dir}"/>
<property name="jar.srcpv.dir" value="${codegen.archive.dir}"/><!-- could be any existent directory -->

Expand Down Expand Up @@ -261,16 +249,6 @@ if="deploy.tomcat.required">
<arg value="${codegen.dir}/${gentime}"/>
</exec>
</target>
<target name="genmd5sign" depends="config" if="genmd5sign.required">
<exec executable="bash" dir="." failonerror="true">
<arg value="${bin.dir}/genmd5sign"/>
<arg value="${codegen.dir}/${signdir}"/>
<arg value="${signclasses}"/>
<arg value="${out.dir}"/>
<arg value="${maindir}/zk/${codegen.dir}/${buildstamp}"/>
<arg value="${maindir}"/>
</exec>
</target>

<target name="build.war" depends="compile" if="build.war.required">
<mkdir dir="${out.dir}"/>
Expand Down
6 changes: 0 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ Copyright (C) 2002 Potix Corporation. All Rights Reserved.
</not>
</condition>

<condition property="genmd5sign.required">
<not>
<equals arg1="${signdir}" arg2=""/>
</not>
</condition>

<!-- deploy -->
<condition property="deploy.lib.required">
<equals arg1="${deploy}" arg2="lib"/>
Expand Down
4 changes: 1 addition & 3 deletions zk/format
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
jar
time=archive/metainfo/zk/build
signdir=archive/metainfo/zk/buildsign
signclasses=org.zkoss.zk.ui.sys.WebAppFactoryImpl,org.zkoss.zk.ui.http.WebManager,org.zkoss.zk.ui.sys.Registry
time=archive/metainfo/zk/build
4 changes: 0 additions & 4 deletions zk/src/org/zkoss/zk/ui/http/SimpleWebApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
import org.zkoss.zk.ui.ext.ScopeListener;
import org.zkoss.zk.ui.impl.AbstractWebApp;
import org.zkoss.zk.ui.impl.ScopeListeners;
import org.zkoss.zk.ui.sys.Registry;
import org.zkoss.zk.ui.sys.WebAppFactoryImpl;
import org.zkoss.zk.ui.util.Configuration;

/**
Expand All @@ -56,8 +54,6 @@ public void init(Object context, Configuration config) {
throw new IllegalArgumentException("context");
_ctx = (ServletContext) context;
super.init(context, config);

Registry.sign(this, Registry.class, WebManager.class, WebAppFactoryImpl.class);
}

private final Map<String, Object> _attrs = new AttributesMap() {
Expand Down
4 changes: 0 additions & 4 deletions zk/src/org/zkoss/zk/ui/http/WebManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@
import org.zkoss.zk.ui.sys.ConfigParser;
import org.zkoss.zk.ui.sys.DesktopCtrl;
import org.zkoss.zk.ui.sys.ExecutionsCtrl;
import org.zkoss.zk.ui.sys.Registry;
import org.zkoss.zk.ui.sys.RequestInfo;
import org.zkoss.zk.ui.sys.SessionsCtrl;
import org.zkoss.zk.ui.sys.UiFactory;
import org.zkoss.zk.ui.sys.WebAppCtrl;
import org.zkoss.zk.ui.sys.WebAppFactory;
import org.zkoss.zk.ui.sys.WebAppFactoryImpl;
import org.zkoss.zk.ui.sys.WebAppsCtrl;
import org.zkoss.zk.ui.util.Configuration;

Expand Down Expand Up @@ -284,8 +282,6 @@ public WebManager(ServletContext ctx, String updateURI, String resourceURI) {
}
}
}

Registry.sign(_wapp, Registry.class, WebManager.class, WebAppFactoryImpl.class);
}

private void checkAndAddExtendlet(String ext, Extendlet extlet) {
Expand Down
23 changes: 0 additions & 23 deletions zk/src/org/zkoss/zk/ui/sys/ConfigParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

import org.slf4j.Logger;
Expand Down Expand Up @@ -175,33 +174,11 @@ else if (config == null)
final List<XMLResourcesLocator.Resource> xmls = locator.getDependentXMLResources("metainfo/zk/config.xml",
"config-name", "depends");

Registry reg = Registry.getInstance();
for (XMLResourcesLocator.Resource res : xmls) {
if (log.isDebugEnabled())
log.debug("Loading " + res.url);
try {
if (checkVersion(res.url, res.document)) {
try {
String path = res.url.toExternalForm();
int end = path.lastIndexOf('/'); // no need to use OS's separator
if (end >= 0) {
InputStream inputStream = null;
try {
path = path.substring(0, end + 1) + Strings.toString(Registry.PREFS_0);
inputStream = new URL(path).openStream();
if (inputStream != null) {
Properties props = new Properties();
props.load(inputStream);
for (Map.Entry<Object, Object> me : props.entrySet())
reg.addKeys((String) me.getKey(), (String) me.getValue());
}
} finally {
if (inputStream != null)
inputStream.close();
}
}
} catch (Exception ignored) {
}
final Element el = res.document.getRootElement();
if (!syscfgLoaded) {
parseSubZScriptConfig(el);
Expand Down
Loading

0 comments on commit 8c84f53

Please sign in to comment.