Class XRPackager
java.lang.Object
org.eclipse.persistence.tools.dbws.XRPackager
- All Implemented Interfaces:
DBWSPackager
- Direct Known Subclasses:
ProviderPackager
PUBLIC: XRPackager implements the DBWSPackager
interface. This packager is
responsible for generating the core X-R metadata files and is the root class from which all
all other packagers inherit.
By default, this packager does not use an archiver and writes out its files 'flat' to the stageDir:
${PACKAGER_ROOT} | eclipselink-dbws.xml -- fixed naming convention | eclipselink-dbws-or.xml | eclipselink-dbws-ox.xml | eclipselink-dbws-schema.xsd | eclipselink-dbws-sessions.xml -- name can be overriden by <sessions-file> entry in eclipselink-dbws.xml | swaref.xsd -- optional if attachements are enabled
- Since:
- EclipseLink 1.x
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.persistence.tools.dbws.DBWSPackager
DBWSPackager.Archiver, DBWSPackager.ArchiveUse
-
Field Summary
Modifier and TypeFieldDescriptionstatic XRPackager.NullOutputStream
protected String[]
protected static final String
protected DBWSPackager.Archiver
protected DBWSPackager.ArchiveUse
protected DBWSBuilder
protected static final String
protected static final String
protected static final String
protected static final String
protected boolean
protected static final String
protected static final String
protected String
protected String
protected static final String
protected File
protected static final String
protected static final String
-
Constructor Summary
ModifierConstructorDescriptionprotected
XRPackager
(DBWSPackager.Archiver archiver, String packagerLabel, DBWSPackager.ArchiveUse useJavaArchive) -
Method Summary
Modifier and TypeMethodDescriptionbuildSessionsXML
(OutputStream dbwsSessionsStream, DBWSBuilder builder) void
closeDeploymentDescriptorStream
(OutputStream descriptorOutputStream) Closes the given OutputStream.void
closeOrStream
(OutputStream orStream) void
closeOxStream
(OutputStream oxStream) void
closeProviderClassStream
(OutputStream classProviderStream) void
closeProviderListenerClassStream
(OutputStream classProviderListenerStream) void
closeProviderListenerSourceStream
(OutputStream sourceProviderListenerStream) void
closeProviderSourceStream
(OutputStream sourceProviderStream) void
closeSchemaStream
(OutputStream schemaStream) void
closeServiceStream
(OutputStream serviceStream) void
closeSessionsStream
(OutputStream sessionsStream) protected void
closeStream
(OutputStream outputStream) void
closeSWARefStream
(OutputStream swarefStream) void
closeWebXmlStream
(OutputStream webXmlStream) void
closeWSDLStream
(OutputStream wsdlStream) void
end()
Return the name of the deployment descriptor file - this will depend on the target application server.Return an OutputStream to the deployment descriptor.getSessionsStream
(String sessionsFileName) getUsage()
boolean
void
void
void
setAdditionalArgs
(String[] additionalArgs) void
setArchiveFilename
(String archiveFilename) void
setArchiver
(DBWSPackager.Archiver archiver) void
setArchiveUse
(DBWSPackager.ArchiveUse packagerUse) void
setDBWSBuilder
(DBWSBuilder builder) void
setHasAttachments
(boolean hasAttachments) void
setSessionsFileName
(String sessionsFileName) void
setStageDir
(File stageDir) void
start()
void
writeDeploymentDescriptor
(OutputStream descriptorOutputStream) Write the deployment descriptor contents to the provided OutputStream.void
writeProvider
(OutputStream sourceProviderStream, OutputStream classProviderStream, OutputStream sourceProviderListenerStream, OutputStream classProviderListenerStream, DBWSBuilder builder) void
writeWebXml
(OutputStream webXmlStream, DBWSBuilder dbwsBuilder)
-
Field Details
-
__nullStream
-
builder
-
additionalArgs
-
stageDir
-
sessionsFileName
-
hasAttachments
protected boolean hasAttachments -
archiver
-
packagerLabel
-
archiveUse
-
OFF
- See Also:
-
SEVERE
- See Also:
-
WARNING
- See Also:
-
INFO
- See Also:
-
CONFIG
- See Also:
-
FINE
- See Also:
-
FINER
- See Also:
-
FINEST
- See Also:
-
ALL
- See Also:
-
XR_STR
- See Also:
-
-
Constructor Details
-
XRPackager
public XRPackager() -
XRPackager
protected XRPackager(DBWSPackager.Archiver archiver, String packagerLabel, DBWSPackager.ArchiveUse useJavaArchive)
-
-
Method Details
-
setDBWSBuilder
- Specified by:
setDBWSBuilder
in interfaceDBWSPackager
-
setAdditionalArgs
- Specified by:
setAdditionalArgs
in interfaceDBWSPackager
-
processAdditionalArgs
public void processAdditionalArgs() -
getStageDir
- Specified by:
getStageDir
in interfaceDBWSPackager
-
setStageDir
- Specified by:
setStageDir
in interfaceDBWSPackager
-
getSessionsFileName
- Specified by:
getSessionsFileName
in interfaceDBWSPackager
-
setSessionsFileName
- Specified by:
setSessionsFileName
in interfaceDBWSPackager
-
hasAttachments
public boolean hasAttachments()- Specified by:
hasAttachments
in interfaceDBWSPackager
-
setHasAttachments
public void setHasAttachments(boolean hasAttachments) - Specified by:
setHasAttachments
in interfaceDBWSPackager
-
getArchiver
-
setArchiver
-
setArchiveUse
- Specified by:
setArchiveUse
in interfaceDBWSPackager
-
processArchiveUse
public void processArchiveUse() -
buildDefaultArchiver
-
getArchiveFilename
- Specified by:
getArchiveFilename
in interfaceDBWSPackager
-
setArchiveFilename
- Specified by:
setArchiveFilename
in interfaceDBWSPackager
-
getPackagerLabel
- Specified by:
getPackagerLabel
in interfaceDBWSPackager
-
getArchiverLabel
-
getUsage
- Specified by:
getUsage
in interfaceDBWSPackager
-
getAdditionalUsage
-
start
public void start()- Specified by:
start
in interfaceDBWSPackager
-
getSchemaStream
- Specified by:
getSchemaStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
closeSchemaStream
- Specified by:
closeSchemaStream
in interfaceDBWSPackager
-
getSessionsStream
- Specified by:
getSessionsStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
buildSessionsXML
- Specified by:
buildSessionsXML
in interfaceDBWSPackager
-
closeSessionsStream
- Specified by:
closeSessionsStream
in interfaceDBWSPackager
-
getServiceStream
- Specified by:
getServiceStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
closeServiceStream
- Specified by:
closeServiceStream
in interfaceDBWSPackager
-
getOrStream
- Specified by:
getOrStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
getOrProjectPathPrefix
- Specified by:
getOrProjectPathPrefix
in interfaceDBWSPackager
-
closeOrStream
- Specified by:
closeOrStream
in interfaceDBWSPackager
-
getOxStream
- Specified by:
getOxStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
getOxProjectPathPrefix
- Specified by:
getOxProjectPathPrefix
in interfaceDBWSPackager
-
closeOxStream
- Specified by:
closeOxStream
in interfaceDBWSPackager
-
getWSDLStream
- Specified by:
getWSDLStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
getWSDLPathPrefix
- Specified by:
getWSDLPathPrefix
in interfaceDBWSPackager
-
closeWSDLStream
- Specified by:
closeWSDLStream
in interfaceDBWSPackager
-
getSWARefStream
- Specified by:
getSWARefStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
closeSWARefStream
- Specified by:
closeSWARefStream
in interfaceDBWSPackager
-
getWebXmlStream
- Specified by:
getWebXmlStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
writeWebXml
- Specified by:
writeWebXml
in interfaceDBWSPackager
-
closeWebXmlStream
- Specified by:
closeWebXmlStream
in interfaceDBWSPackager
-
getProviderSourceStream
- Specified by:
getProviderSourceStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
closeProviderSourceStream
- Specified by:
closeProviderSourceStream
in interfaceDBWSPackager
-
getProviderClassStream
- Specified by:
getProviderClassStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
closeProviderClassStream
- Specified by:
closeProviderClassStream
in interfaceDBWSPackager
-
getProviderListenerSourceStream
- Specified by:
getProviderListenerSourceStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
closeProviderListenerSourceStream
- Specified by:
closeProviderListenerSourceStream
in interfaceDBWSPackager
-
getProviderListenerClassStream
- Specified by:
getProviderListenerClassStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
closeProviderListenerClassStream
- Specified by:
closeProviderListenerClassStream
in interfaceDBWSPackager
-
writeProvider
public void writeProvider(OutputStream sourceProviderStream, OutputStream classProviderStream, OutputStream sourceProviderListenerStream, OutputStream classProviderListenerStream, DBWSBuilder builder) - Specified by:
writeProvider
in interfaceDBWSPackager
-
closeStream
-
end
public void end()- Specified by:
end
in interfaceDBWSPackager
-
writeDeploymentDescriptor
Write the deployment descriptor contents to the provided OutputStream.- Specified by:
writeDeploymentDescriptor
in interfaceDBWSPackager
-
getDeploymentDescriptorStream
Return an OutputStream to the deployment descriptor. Deployment descriptor is optional, so return a null stream.- Specified by:
getDeploymentDescriptorStream
in interfaceDBWSPackager
- Throws:
FileNotFoundException
-
closeDeploymentDescriptorStream
Closes the given OutputStream.- Specified by:
closeDeploymentDescriptorStream
in interfaceDBWSPackager
-
getDeploymentDescriptorFileName
Return the name of the deployment descriptor file - this will depend on the target application server. Since the deployment descriptor is optional, return null.- Specified by:
getDeploymentDescriptorFileName
in interfaceDBWSPackager
-