All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.persistence.tools.dbws.JDevPackager Maven / Gradle / Ivy

There is a newer version: 5.0.0-B08
Show newest version
/*
 * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0,
 * or the Eclipse Distribution License v. 1.0 which is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
 */

// Contributors:
//     Mike Norman - Aug 2008, created DBWS JDev(Boxer) packager

package org.eclipse.persistence.tools.dbws;

import static org.eclipse.persistence.tools.dbws.DBWSPackager.ArchiveUse.noArchive;

//javase imports
import java.io.OutputStream;

//EclipseLink imports
import org.eclipse.persistence.internal.sessions.factories.model.SessionConfigs;
import org.eclipse.persistence.internal.sessions.factories.model.session.DatabaseSessionConfig;

/**
 * 

* PUBLIC: JDevPackager extends {@link IDEPackager}. It is responsible for generating
* the source code of the DBWS Provider (instead of a .class file) and packaging in a
* JDev-friendly directory structure all the other DBWS files produced by its parent: *

 * \--- JDev Projectnnn root directory
 *    |   dbws-builder.xml
 *    |
 *    +---public_html
 *    |   \---WEB-INF
 *    |       |   web.xml
 *    |       |
 *    |       \---wsdl
 *    |               swaref.xsd
 *    |               eclipselink-dbws-schema.xsd
 *    |               eclipselink-dbws.wsdl
 *    |
 *    \---src
 *        |   eclipselink-dbws-or.xml
 *        |   eclipselink-dbws-ox.xml
 *        |   eclipselink-dbws-sessions.xml
 *        |   eclipselink-dbws.xml
 *        |
 *        \---_dbws
 *                DBWSProvider.java  -- generated by this Packager
 * 
* * @author Mike Norman - [email protected] * @since EclipseLink 1.x */ public class JDevPackager extends IDEPackager { public static final String PUBLIC_HTML_DIR = "public_html"; public JDevPackager() { this(null, "jdev", noArchive); srcDirname = SRC_DIR; publicHTMLDirname = PUBLIC_HTML_DIR; } protected JDevPackager(Archiver archiver, String packagerLabel, ArchiveUse useJavaArchive) { super(archiver, packagerLabel, useJavaArchive); } @Override public SessionConfigs buildSessionsXML(OutputStream dbwsSessionsStream, DBWSBuilder builder) { SessionConfigs ts = super.buildSessionsXML(dbwsSessionsStream, builder); String dataSource = builder.getDataSource(); if (dataSource != null) { DatabaseSessionConfig tmpConfig = (DatabaseSessionConfig)ts.getSessionConfigs().get(0); WeblogicPackager.buildDatabaseSessionConfig(ts, tmpConfig, builder); } return ts; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy