01: package com.sun.portal.rewriter;
02:
03: import com.sun.portal.rewriter.rom.InvalidXMLException;
04: import com.sun.portal.rewriter.rom.RuleSetManager;
05: import com.sun.portal.rewriter.services.DataServiceException;
06: import com.sun.portal.rewriter.util.Resource;
07:
08: /**
09: * This class handles all the post install tasks of rewriter at portal end.
10: */
11: public final class PortalRewriterPostInstallTasks {
12: public static void doInstallTimeUpload(final String[][] files2Upload)
13: throws InvalidXMLException, DataServiceException {
14: for (int i = 0; i < files2Upload.length; i++) {
15: final String lRules = Resource.read(files2Upload[i][0]);
16: RuleSetManager.getDefault().store(lRules);
17: }
18: }//doDefaultDataUpload()
19:
20: public static void main(String[] args) throws Exception {
21: RewriterModule.initIDSAME(args[0], args[1]);
22: doInstallTimeUpload(RewriterModule.PORTAL_RULESET_SPEC);
23: }//main()
24:
25: }//class PortalRewriterPostInstallTasks
|