1 /*
2 * Copyright 2007 Hippo
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not 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"
12 * BASIS, 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.
15 */
16 package nl.hippo.portal.cms.cache;
17
18 import nl.hippo.client.api.content.DocumentPath;
19 import nl.hippo.client.api.event.EventValidity;
20 import nl.hippo.client.api.event.EventValidityImpl;
21
22 /***
23 * @author <a href="mailto:d.dam@hippo.nl">Dennis Dam</a>
24 *
25 * @version $Id: EventValidityFactoryImpl.java 6521 2007-05-22 13:16:10Z ddam $
26 */
27 public class EventValidityFactoryImpl implements EventValidityFactory {
28
29 /* (non-Javadoc)
30 * @see nl.hippo.portal.cms.cache.EventValidityFactory#createAggregatedValidity(nl.hippo.client.api.content.DocumentPath[])
31 */
32 public EventValidity[] createValidities(DocumentPath[] paths) {
33 EventValidity[] validities = new EventValidity[paths.length];
34 for (int i = 0; i < paths.length; i++) {
35 validities[i] = new EventValidityImpl(paths[i].getFullPath());
36 }
37 return validities;
38 }
39
40 /* (non-Javadoc)
41 * @see nl.hippo.portal.cms.cache.EventValidityFactory#createValidity(nl.hippo.client.api.content.DocumentPath)
42 */
43 public EventValidity createValidity(DocumentPath path) {
44 return new EventValidityImpl(path.getFullPath());
45 }
46
47 }