File Source: RollerPlanetModule.java
/*
P/P * Method: org.apache.roller.weblogger.planet.business.jpa.RollerPlanetModule__static_init
*/
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. The ASF licenses this file to You
4 * under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License. For additional information regarding
15 * copyright in this work, please see the NOTICE file in the top level
16 * directory of this distribution.
17 */
18
19 package org.apache.roller.weblogger.planet.business.jpa;
20
21 import com.google.inject.Binder;
22 import com.google.inject.Module;
23 import org.apache.roller.planet.business.MultiPlanetURLStrategy;
24 import org.apache.roller.planet.business.Planet;
25 import org.apache.roller.planet.business.PlanetManager;
26 import org.apache.roller.planet.business.PropertiesManager;
27 import org.apache.roller.planet.business.URLStrategy;
28 import org.apache.roller.planet.business.fetcher.FeedFetcher;
29 import org.apache.roller.planet.business.jpa.JPAPersistenceStrategy;
30 import org.apache.roller.planet.business.jpa.JPAPlanetImpl;
31 import org.apache.roller.planet.business.jpa.JPAPlanetManagerImpl;
32 import org.apache.roller.planet.business.jpa.JPAPropertiesManagerImpl;
33 import org.apache.roller.weblogger.planet.business.WebloggerRomeFeedFetcher;
34
35
36 /**
37 * Guice module for configuring Roller's built-in Planet, JPA version.
38 */
/*
P/P * Method: void org.apache.roller.weblogger.planet.business.jpa.RollerPlanetModule()
*/
39 public class RollerPlanetModule implements Module {
40
41 public void configure(Binder binder) {
42
/*
P/P * Method: void configure(Binder)
*
* Preconditions:
* binder != null
*
* Presumptions:
* com.google.inject.Binder:bind(...)@43 != null
* com.google.inject.Binder:bind(...)@46 != null
* com.google.inject.Binder:bind(...)@48 != null
* com.google.inject.Binder:bind(...)@49 != null
* com.google.inject.Binder:bind(...)@50 != null
* ...
*/
43 binder.bind(Planet.class).to(JPAPlanetImpl.class);
44
45 // Use special Planet persistence strategy that works against RollerConfig
46 binder.bind(JPAPersistenceStrategy.class).to(JPARollerPlanetPersistenceStrategy.class);
47
48 binder.bind(PlanetManager.class).to( JPAPlanetManagerImpl.class);
49 binder.bind(PropertiesManager.class).to( JPAPropertiesManagerImpl.class);
50 binder.bind(URLStrategy.class).to( MultiPlanetURLStrategy.class);
51 binder.bind(FeedFetcher.class).to( WebloggerRomeFeedFetcher.class);
52 }
53
54 }
SofCheck Inspector Build Version : 2.18479
| RollerPlanetModule.java |
2009-Jan-02 14:24:50 |
| RollerPlanetModule.class |
2009-Sep-04 03:12:43 |