01: /*
02: * Copyright 2001-2006 C:1 Financial Services GmbH
03: *
04: * This software is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License Version 2.1, as published by the Free Software Foundation.
07: *
08: * This software is distributed in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11: * Lesser General Public License for more details.
12: *
13: * You should have received a copy of the GNU Lesser General Public
14: * License along with this library; if not, write to the Free Software
15: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
16: */
17:
18: package de.finix.contelligent.content;
19:
20: import java.io.IOException;
21:
22: import javax.xml.parsers.DocumentBuilder;
23: import javax.xml.parsers.DocumentBuilderFactory;
24:
25: import org.w3c.dom.Node;
26:
27: import de.finix.contelligent.CallData;
28: import de.finix.contelligent.Component;
29: import de.finix.contelligent.exception.ComponentPersistenceException;
30: import de.finix.contelligent.logging.LoggingService;
31: import de.finix.contelligent.resource.TextResource;
32:
33: /**
34: * This class represents text content that is managed by contelligent (in spite
35: * of content imported from foreign systems)
36: */
37: public class ContelligentDomContent extends ContelligentContent
38: implements DomContent {
39:
40: final static org.apache.log4j.Logger log = LoggingService
41: .getLogger(ContelligentDomContent.class);
42:
43: private static DocumentBuilder builder = null;
44:
45: private static DocumentBuilderFactory factory = DocumentBuilderFactory
46: .newInstance();
47:
48: public ContelligentDomContent(Component component) throws Exception {
49: super (component);
50: }
51:
52: public Object getContentValue(CallData callData)
53: throws IOException, ComponentPersistenceException {
54: return getNode(callData);
55: }
56:
57: private TextResource getTextResource(CallData callData)
58: throws IOException, ComponentPersistenceException {
59: return (TextResource) getResource(callData);
60: }
61:
62: public Node getNode(CallData callData) throws IOException {
63: return null;
64: }
65:
66: public long lastModified(CallData callData) throws IOException,
67: ComponentPersistenceException {
68: return getTextResource(callData).getLastModified();
69: }
70: }
|