KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > config > schema > test > ConfigBuilderFactoryImpl


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.config.schema.test;
5
6 import com.tc.config.schema.builder.ConfigBuilderFactory;
7 import com.tc.config.schema.builder.InstrumentedClassConfigBuilder;
8 import com.tc.config.schema.builder.LockConfigBuilder;
9 import com.tc.config.schema.builder.RootConfigBuilder;
10
11 public class ConfigBuilderFactoryImpl implements ConfigBuilderFactory {
12
13   public RootConfigBuilder newRootConfigBuilder() {
14     RootConfigBuilder rv = new RootConfigBuilderImpl();
15     return rv;
16   }
17
18   public InstrumentedClassConfigBuilder newInstrumentedClassConfigBuilder() {
19     return new InstrumentedClassConfigBuilderImpl();
20   }
21
22   public LockConfigBuilder newWriteAutoLockConfigBuilder() {
23     LockConfigBuilder builder = new LockConfigBuilderImpl(LockConfigBuilder.TAG_AUTO_LOCK);
24     builder.setLockLevel(LockConfigBuilder.LEVEL_WRITE);
25     return builder;
26   }
27
28   public LockConfigBuilder newReadAutoLockConfigBuilder() {
29     LockConfigBuilder builder = new LockConfigBuilderImpl(LockConfigBuilder.TAG_AUTO_LOCK);
30     builder.setLockLevel(LockConfigBuilder.LEVEL_READ);
31     return builder;
32   }
33
34 }
35
Popular Tags