|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.xml.CmsXmlEntityResolver
public class CmsXmlEntityResolver
Resolves XML entities (e.g. external DTDs) in the OpenCms VFS.
Also provides a cache for XML content schema definitions.
Field Summary | |
---|---|
static java.lang.String |
OPENCMS_SCHEME
The scheme to identify a file in the OpenCms VFS. |
Constructor Summary | |
---|---|
CmsXmlEntityResolver(CmsObject cms)
Creates a new XML entity resolver based on the provided CmsObject. |
Method Summary | |
---|---|
void |
cacheContentDefinition(java.lang.String systemId,
CmsXmlContentDefinition contentDefinition)
Caches an XML content definition based on the given system id and the online / offline status of this entity resolver instance. |
static void |
cacheSystemId(java.lang.String systemId,
byte[] content)
Adds a sytem id URL to to internal permanent cache. |
void |
cmsEvent(CmsEvent event)
Acknowledge the occurrence of the specified event, implement this method to check for CmsEvents in your class. |
CmsXmlContentDefinition |
getCachedContentDefinition(java.lang.String systemId)
Looks up the given XML content definition system id in the internal content definition cache. |
protected static void |
initialize(CmsObject adminCms,
byte[] typeSchemaBytes)
Initialize the OpenCms XML entity resolver. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OPENCMS_SCHEME
Constructor Detail |
---|
public CmsXmlEntityResolver(CmsObject cms)
If the provided CmsObject is null, then the OpenCms VFS is not searched for XML entities, however the internal cache and other OpenCms internal entities not in the VFS are still resolved.
cms
- the cms context to use for resolving XML files from the OpenCms VFSMethod Detail |
---|
public static void cacheSystemId(java.lang.String systemId, byte[] content)
This cache will NOT be cleared automatically.
systemId
- the system id to addcontent
- the content of the system idprotected static void initialize(CmsObject adminCms, byte[] typeSchemaBytes)
adminCms
- an initialized OpenCms user context with "Administrator" role permissionstypeSchemaBytes
- the base widget type XML schema definitionsCmsXmlContentTypeManager.initialize(CmsObject)
public void cacheContentDefinition(java.lang.String systemId, CmsXmlContentDefinition contentDefinition)
systemId
- the system id to use as cache keycontentDefinition
- the content definition to cachepublic void cmsEvent(CmsEvent event)
I_CmsEventListener
cmsEvent
in interface I_CmsEventListener
event
- CmsEvent that has occurredI_CmsEventListener.cmsEvent(org.opencms.main.CmsEvent)
public CmsXmlContentDefinition getCachedContentDefinition(java.lang.String systemId)
systemId
- the system id of the XML content definition to look up
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
resolveEntity
in interface org.xml.sax.EntityResolver
EntityResolver.resolveEntity(java.lang.String, java.lang.String)
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |