taylor 2002/09/23 01:42:44 Modified: src/java/org/apache/jetspeed/services/psmlmanager CastorPsmlManagerService.java Log: changed private to protected in order to extend CastorPsmlManagerService Revision Changes Path 1.29 +48 -45 jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java Index: CastorPsmlManagerService.java =================================================================== RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- CastorPsmlManagerService.java 29 Jul 2002 02:25:27 -0000 1.28 +++ CastorPsmlManagerService.java 23 Sep 2002 08:42:44 -0000 1.29 @@ -128,13 +128,13 @@ implements PsmlManagerService { // resource path constants - private static final String PATH_GROUP = "group"; - private static final String PATH_ROLE = "role"; - private static final String PATH_USER = "user"; + protected static final String PATH_GROUP = "group"; + protected static final String PATH_ROLE = "role"; + protected static final String PATH_USER = "user"; // configuration keys - private final static String CONFIG_ROOT = "root"; - private final static String CONFIG_EXT = "ext"; + protected final static String CONFIG_ROOT = "root"; + protected final static String CONFIG_EXT = "ext"; // default configuration values public final static String DEFAULT_ROOT = "/WEB-INF/psml"; @@ -144,33 +144,34 @@ public final static String DEFAULT_RESOURCE = "default.psml"; // the root psml resource directory - private String root; + protected String root; // base store directory - private File rootDir = null; + protected File rootDir = null; // file extension - private String ext; + protected String ext; /** The documents loaded by this manager */ - private Map documents = new HashMap(); + protected Map documents = new HashMap(); /** The watcher for the document locations */ - private DocumentWatcher watcher = null; + protected DocumentWatcher watcher = null; /** the output format for pretty printing when saving registries */ - private OutputFormat format = null; + protected OutputFormat format = null; /** the base refresh rate for documents */ - private long scanRate = 1000 * 60; + protected long scanRate = 1000 * 60; /** the import/export consumer service **/ - private PsmlManagerService consumer = null; - private boolean importFlag = false; + protected PsmlManagerService consumer = null; + protected boolean importFlag = false; // castor mapping public static final String DEFAULT_MAPPING = "${webappRoot}/WEB-INF/conf/psml-mapping.xml"; - String mapFile = null; + protected String mapFile = null; + /** the Castor mapping file name */ - private Mapping mapping = null; + protected Mapping mapping = null; /** * This is the early initialization method called by the @@ -387,7 +388,7 @@ * @param fileOrUrl a String representing either an absolute URL or an * absolute filepath */ - private PSMLDocument loadDocument(String fileOrUrl) + protected PSMLDocument loadDocument(String fileOrUrl) { PSMLDocument doc = null; @@ -419,8 +420,10 @@ doc.setPortlets(portlets); - this.watcher.addFile(fileOrUrl,f); - + if (this.watcher != null) + { + this.watcher.addFile(fileOrUrl,f); + } } catch (IOException e) { @@ -694,9 +697,9 @@ protected class DocumentWatcher extends Thread { - private Map fileToName = new HashMap(); - private Map fileToDate = new HashMap(); - private boolean done = false; + protected Map fileToName = new HashMap(); + protected Map fileToDate = new HashMap(); + protected boolean done = false; protected DocumentWatcher() { @@ -1087,12 +1090,12 @@ return path.toString(); } - private static int STATE_INIT = 0; - private static int STATE_BASE = 1; - private static int STATE_NAME = 2; - private static int STATE_MEDIA = 3; - private static int STATE_LANGUAGE = 4; - private static int STATE_COUNTRY = 5; + protected static int STATE_INIT = 0; + protected static int STATE_BASE = 1; + protected static int STATE_NAME = 2; + protected static int STATE_MEDIA = 3; + protected static int STATE_LANGUAGE = 4; + protected static int STATE_COUNTRY = 5; /** Query for a collection of profiles given a profile locator criteria. * @@ -1199,7 +1202,7 @@ /** Create a profile based on import flag. * */ - private Profile createProfile() + protected Profile createProfile() { if (importFlag) return new ImportProfile(this, this.consumer); @@ -1207,7 +1210,7 @@ return new BaseProfile(); } - private Profile createProfile(ProfileLocator locator) + protected Profile createProfile(ProfileLocator locator) { if (importFlag) return new ImportProfile(this, this.consumer, locator); @@ -1273,7 +1276,7 @@ * * @param locator The profile locator criteria. */ - private void subQuery(QueryState qs, String path) + protected void subQuery(QueryState qs, String path) { File file = new File(path); if (file.isFile()) @@ -1457,21 +1460,21 @@ this.state = state; } - private int queryBy; - private Profile profile; - private ProfileLocator locator; - private List list; - private String name; - private int state; + protected int queryBy; + protected Profile profile; + protected ProfileLocator locator; + protected List list; + protected String name; + protected int state; - private boolean clearName = false; - private boolean clearMedia = false; - private boolean clearLanguage = false; - private boolean clearCountry = false; + protected boolean clearName = false; + protected boolean clearMedia = false; + protected boolean clearLanguage = false; + protected boolean clearCountry = false; } - private void testCases() + protected void testCases() { try { @@ -1496,7 +1499,7 @@ } } - private void dump( Iterator it ) + protected void dump( Iterator it ) { System.out.println("==============================================="); while (it.hasNext() ) @@ -1507,7 +1510,7 @@ System.out.println("==============================================="); } - private void dumpProfile(Profile profile) + protected void dumpProfile(Profile profile) { JetspeedUser user = profile.getUser(); Group group = profile.getGroup();
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>