index int64 0 0 | repo_id stringlengths 9 205 | file_path stringlengths 31 246 | content stringlengths 1 12.2M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy/shared/ActionTypeTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.shared;
import junit.framework.TestCase;
/**
* @version $Rev$ $Date$
*/
public class ActionTypeTest extends TestCase {
public void testValues() {
assertEquals(0, ActionType.EXECUTE.getValue());
assertEquals(1, ActionType.CANCEL.getValue());
assertEquals(2, ActionType.STOP.getValue());
}
public void testToString() {
assertEquals("execute", ActionType.EXECUTE.toString());
assertEquals("cancel", ActionType.CANCEL.toString());
assertEquals("stop", ActionType.STOP.toString());
// only possible due to package local access
assertEquals("5", new ActionType(5).toString());
}
public void testValueToSmall() {
try {
ActionType.getActionType(-1);
fail("Expected AIOOBE");
} catch (ArrayIndexOutOfBoundsException aioobe) {
}
}
public void testValueToLarge() {
try {
ActionType.getActionType(5);
fail("Expected AIOOBE");
} catch (ArrayIndexOutOfBoundsException aioobe) {
}
}
}
| 1,300 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy/shared/DConfigBeanVersionTypeTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.shared;
import junit.framework.TestCase;
/**
* @version $Rev$ $Date$
*/
public class DConfigBeanVersionTypeTest extends TestCase {
public void testValues() {
assertEquals(0, DConfigBeanVersionType.V1_3.getValue());
assertEquals(1, DConfigBeanVersionType.V1_3_1.getValue());
assertEquals(2, DConfigBeanVersionType.V1_4.getValue());
assertEquals(3, DConfigBeanVersionType.V5.getValue());
}
public void testToString() {
assertEquals("V1_3", DConfigBeanVersionType.V1_3.toString());
assertEquals("V1_3_1", DConfigBeanVersionType.V1_3_1.toString());
assertEquals("V1_4", DConfigBeanVersionType.V1_4.toString());
assertEquals("V5", DConfigBeanVersionType.V5.toString());
// only possible due to package local access
assertEquals("5", new ActionType(5).toString());
}
public void testValueToSmall() {
try {
DConfigBeanVersionType.getDConfigBeanVersionType(-1);
fail("Expected AIOOBE");
} catch (ArrayIndexOutOfBoundsException aioobe) {
}
}
public void testValueToLarge() {
try {
DConfigBeanVersionType.getDConfigBeanVersionType(4);
fail("Expected AIOOBE");
} catch (ArrayIndexOutOfBoundsException aioobe) {
}
}
}
| 1,301 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy/shared | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManagerTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.shared.factories;
import junit.framework.TestCase;
import javax.enterprise.deploy.spi.factories.DeploymentFactory;
import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
import javax.enterprise.deploy.spi.DeploymentManager;
import javax.enterprise.deploy.spi.factories.MockDeploymentFactory;
/**
* Low level tests on the DeploymentFactoryManager.
*
* @version $Rev$ $Date$
*/
public class DeploymentFactoryManagerTest extends TestCase {
private DeploymentFactoryManager factoryManager;
private MockDeploymentFactory mockFactory = new MockDeploymentFactory("deployer");
protected void setUp() throws Exception {
super.setUp();
factoryManager = DeploymentFactoryManager.getInstance();
}
protected void tearDown() throws Exception {
factoryManager = null;
super.tearDown();
}
public void testGetDeploymentManagerWithoutAnyRegisteredFactories() {
try {
factoryManager.getDeploymentManager("invalid-uri", null, null);
fail("Expected a DeploymentManagerCreationException");
} catch (DeploymentManagerCreationException e) {
assertTrue(e.getMessage().startsWith("Could not get DeploymentManager"));
}
}
public void testDisconnectedGetDeploymentManagerWithoutAnyRegisteredFactories() {
try {
factoryManager.getDisconnectedDeploymentManager("invalid-uri");
fail("Expected a DeploymentManagerCreationException");
} catch (DeploymentManagerCreationException e) {
assertTrue(e.getMessage().startsWith("Could not get DeploymentManager"));
}
}
public void testGetDeploymentManagerWithNullURI() {
try {
factoryManager.getDeploymentManager(null, null, null);
fail("Expected an IllegalArgumentException");
} catch (IllegalArgumentException e) {
} catch(DeploymentManagerCreationException e) {
fail("Unexpected Exception: "+e.getMessage());
}
}
public void testDisconnectedGetDeploymentManagerWithNullURI() {
try {
factoryManager.getDisconnectedDeploymentManager(null);
fail("Expected an IllegalArgumentException");
} catch (IllegalArgumentException e) {
} catch(DeploymentManagerCreationException e) {
fail("Unexpected Exception: "+e.getMessage());
}
}
public void testRegisterNull() {
try {
factoryManager.registerDeploymentFactory(null);
fail("Should have gotten an IllegalArgumentException");
} catch(IllegalArgumentException e) {
}
}
public void testRegisterDeploymentFactory() {
int initialNumberOfFactories = factoryManager.getDeploymentFactories().length;
DeploymentFactory factory = new MockDeploymentFactory("foo");
factoryManager.registerDeploymentFactory(factory);
int expectedNumberOfFactories = initialNumberOfFactories + 1;
int currentNumberOfFactories = factoryManager.getDeploymentFactories().length;
assertEquals(expectedNumberOfFactories, currentNumberOfFactories);
}
public void testGetDeploymentManager() {
ensureFactoryRegistered();
DeploymentManager deploymentManager = null;
try {
deploymentManager = factoryManager.getDeploymentManager("deployer:geronimo://server:port/application", "username", "password");
} catch (DeploymentManagerCreationException e) {
fail("Didn't expect a DeploymentManagerException here.");
}
assertNotNull("Expected an instance of the DeploymentManager", deploymentManager);
}
public void testGetDisconnectedDeploymentManager() {
ensureFactoryRegistered();
DeploymentManager deploymentManager = null;
try {
deploymentManager = factoryManager.getDeploymentManager("deployer:geronimo:", null, null);
} catch (DeploymentManagerCreationException e) {
fail("Didn't expect a DeploymentManagerException here.");
}
assertNotNull("Expected an instance of the DeploymentManager", deploymentManager);
}
public void testDeploymentManagerCreationException() {
ensureFactoryRegistered();
try {
factoryManager.getDisconnectedDeploymentManager("throw-exception");
fail("Expected a DeploymentManagerCreationException");
} catch (DeploymentManagerCreationException e) {
//
// jason: probably not a hot idea to validate the message here
//
// assertTrue(e.getMessage().startsWith("Could not get DeploymentManager"));
}
}
private void ensureFactoryRegistered() {
DeploymentFactory[] factories = factoryManager.getDeploymentFactories();
for (int i = 0; i < factories.length; i++) {
if (factories[i] == mockFactory) {
return;
}
}
factoryManager.registerDeploymentFactory(new MockDeploymentFactory("deployer"));
}
}
| 1,302 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy/spi/MockDeploymentManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi;
import javax.enterprise.deploy.model.DeployableObject;
import javax.enterprise.deploy.shared.DConfigBeanVersionType;
import javax.enterprise.deploy.shared.ModuleType;
import javax.enterprise.deploy.spi.exceptions.DConfigBeanVersionUnsupportedException;
import javax.enterprise.deploy.spi.exceptions.InvalidModuleException;
import javax.enterprise.deploy.spi.exceptions.TargetException;
import javax.enterprise.deploy.spi.status.ProgressObject;
import java.io.File;
import java.io.InputStream;
import java.util.Locale;
/**
* @version $Rev$ $Date$
*/
public class MockDeploymentManager implements DeploymentManager {
public Target[] getTargets() throws IllegalStateException {
return new Target[0];
}
public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException {
return new TargetModuleID[0];
}
public TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException {
return new TargetModuleID[0];
}
public TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException {
return new TargetModuleID[0];
}
public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException {
return null;
}
public ProgressObject distribute(Target[] targetList, File moduleArchive, File deploymentPlan) throws IllegalStateException {
return null;
}
public ProgressObject distribute(Target[] targetList, InputStream moduleArchive, InputStream deploymentPlan) throws IllegalStateException {
return null;
}
public ProgressObject distribute(Target[] targetList, ModuleType moduleType, InputStream moduleArchive, InputStream deploymentPlan) throws IllegalStateException {
return null;
}
public ProgressObject start(TargetModuleID[] moduleIDList) throws IllegalStateException {
return null;
}
public ProgressObject stop(TargetModuleID[] moduleIDList) throws IllegalStateException {
return null;
}
public ProgressObject undeploy(TargetModuleID[] moduleIDList) throws IllegalStateException {
return null;
}
public boolean isRedeploySupported() {
return false;
}
public ProgressObject redeploy(TargetModuleID[] moduleIDList, File moduleArchive, File deploymentPlan) throws UnsupportedOperationException, IllegalStateException {
return null;
}
public ProgressObject redeploy(TargetModuleID[] moduleIDList, InputStream moduleArchive, InputStream deploymentPlan) throws UnsupportedOperationException, IllegalStateException {
return null;
}
public void release() {
}
public Locale getDefaultLocale() {
return null;
}
public Locale getCurrentLocale() {
return null;
}
public void setLocale(Locale locale) throws UnsupportedOperationException {
}
public Locale[] getSupportedLocales() {
return new Locale[0];
}
public boolean isLocaleSupported(Locale locale) {
return false;
}
public DConfigBeanVersionType getDConfigBeanVersion() {
return null;
}
public boolean isDConfigBeanVersionSupported(DConfigBeanVersionType version) {
return false;
}
public void setDConfigBeanVersion(DConfigBeanVersionType version) throws DConfigBeanVersionUnsupportedException {
}
}
| 1,303 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy/spi/factories/MockDeploymentFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.factories;
import javax.enterprise.deploy.spi.MockDeploymentManager;
import javax.enterprise.deploy.spi.DeploymentManager;
import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
/**
* @version $Rev$ $Date$
*/
public class MockDeploymentFactory implements DeploymentFactory {
private String scheme;
public MockDeploymentFactory(String scheme) {
this.scheme = scheme;
}
public boolean handlesURI(String uri) {
return uri != null && uri.startsWith(scheme);
}
public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException {
return getDisconnectedDeploymentManager(uri);
}
public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException {
if ("return-null".equals(uri)) {
return null;
} else if ("throw-exception".equals(uri)) {
throw new DeploymentManagerCreationException("Simulated Exception");
} else {
return new MockDeploymentManager();
}
}
public String getDisplayName() {
return null;
}
public String getProductVersion() {
return null;
}
}
| 1,304 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/test/java/javax/enterprise/deploy/model/XPathEventTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.model;
import junit.framework.TestCase;
/**
* @version $Rev$ $Date$
*/
public class XPathEventTest extends TestCase {
public void testIsAddEvent() {
XpathEvent addEvent = new XpathEvent(null, XpathEvent.BEAN_ADDED);
assertTrue(addEvent.isAddEvent());
assertFalse(addEvent.isChangeEvent());
assertFalse(addEvent.isRemoveEvent());
}
public void testIsChangeEvent() {
XpathEvent changeEvent = new XpathEvent(null, XpathEvent.BEAN_CHANGED);
assertTrue(changeEvent.isChangeEvent());
assertFalse(changeEvent.isAddEvent());
assertFalse(changeEvent.isRemoveEvent());
}
public void testIsRemoveEvent() {
XpathEvent removeEvent = new XpathEvent(null, XpathEvent.BEAN_REMOVED);
assertTrue(removeEvent.isRemoveEvent());
assertFalse(removeEvent.isAddEvent());
assertFalse(removeEvent.isChangeEvent());
}
}
| 1,305 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/shared/ActionType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.shared;
/**
* Class ActionTypes defines enumeration values for the J2EE DeploymentStatus
* actions.
*
* @version $Rev$ $Date$
*/
public class ActionType {
/**
* The action is currently executing.
*/
public static final ActionType EXECUTE = new ActionType(0);
/**
* The action has been canceled.
*/
public static final ActionType CANCEL = new ActionType(1);
/**
* A stop operation is being performed on the DeploymentManager action command.
*/
public static final ActionType STOP = new ActionType(2);
private static final ActionType[] enumValueTable = new ActionType[]{
EXECUTE,
CANCEL,
STOP,
};
private static final String[] stringTable = new String[]{
"execute",
"cancel",
"stop",
};
private int value;
/**
* Construct a new enumeration value with the given integer value.
*/
protected ActionType(int value) {
this.value = value;
}
/**
* Returns this enumeration value's integer value.
*
* @return the value
*/
public int getValue() {
return value;
}
/**
* Returns the string table for class ActionType
*/
protected String[] getStringTable() {
return stringTable;
}
/**
* Returns the enumeration value table for class ActionType
*/
protected ActionType[] getEnumValueTable() {
return enumValueTable;
}
/**
* Return an object of the specified value.
*
* @param value a designator for the object.
*/
public static ActionType getActionType(int value) {
return enumValueTable[value];
}
/**
* Return the string name of this ActionType or the integer value if
* outside the bounds of the table
*/
public String toString() {
return (value >= 0 && value <= 2) ? stringTable[value] : String.valueOf(value);
}
/**
* Returns the lowest integer value used by this enumeration value's
* enumeration class.
*
* @return the offset of the lowest enumeration value.
*/
protected int getOffset() {
return 0;
}
} | 1,306 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/shared/StateType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.shared;
/**
* Defines enumeration values for the various states of a deployment action.
*
* @version $Rev$ $Date$
*/
public class StateType {
/**
* The action operation is running normally.
*/
public static final StateType RUNNING = new StateType(0);
/**
* The action operation has completed normally.
*/
public static final StateType COMPLETED = new StateType(1);
/**
* The action operation has failed.
*/
public static final StateType FAILED = new StateType(2);
/**
* The DeploymentManager is running in disconnected mode.
*/
public static final StateType RELEASED = new StateType(3);
private static final StateType[] enumValueTable = {
RUNNING,
COMPLETED,
FAILED,
RELEASED,
};
private static final String[] stringTable = {
"running",
"completed",
"failed",
"released",
};
private int value;
/**
* Construct a new enumeration value with the given integer value.
*/
protected StateType(int value) {
this.value = value;
}
/**
* Returns this enumeration value's integer value.
*/
public int getValue() {
return value;
}
/**
* Returns the string table for class StateType
*/
protected String[] getStringTable() {
return stringTable;
}
/**
* Returns the enumeration value table for class StateType
*/
protected StateType[] getEnumValueTable() {
return enumValueTable;
}
/**
* Return an object of the specified value.
*
* @param value a designator for the object.
*/
public static StateType getStateType(int value) {
return enumValueTable[value];
}
/**
* Return the string name of this StateType or the integer value if
* outside the bounds of the table
*/
public String toString() {
return (value >= 0 && value <= 3) ? stringTable[value] : String.valueOf(value);
}
/**
* Returns the lowest integer value used by this enumeration value's
* enumeration class.
*
* @return the offset of the lowest enumeration value.
*/
protected int getOffset() {
return 0;
}
} | 1,307 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/shared/ModuleType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.shared;
/**
* Class ModuleTypes defines enumeration values for the J2EE module types.
*
* @version $Rev$ $Date$
*/
public class ModuleType {
/**
* The module is an EAR archive.
*/
public static final ModuleType EAR = new ModuleType(0);
/**
* The module is an Enterprise Java Bean archive.
*/
public static final ModuleType EJB = new ModuleType(1);
/**
* The module is an Client Application archive.
*/
public static final ModuleType CAR = new ModuleType(2);
/**
* The module is an Connector archive.
*/
public static final ModuleType RAR = new ModuleType(3);
/**
* The module is an Web Application archive.
*/
public static final ModuleType WAR = new ModuleType(4);
private static final ModuleType[] enumValueTable = {
EAR,
EJB,
CAR,
RAR,
WAR,
};
private static final String[] stringTable = {
"ear",
"ejb",
"car",
"rar",
"war",
};
private static final String[] moduleExtensionTable = {
".ear",
".jar",
".jar",
".rar",
".war",
};
private int value;
/**
* Construct a new enumeration value with the given integer value.
*/
protected ModuleType(int value) {
this.value = value;
}
/**
* Returns this enumeration value's integer value.
*/
public int getValue() {
return value;
}
/**
* Returns the string table for class ModuleType
*/
protected String[] getStringTable() {
return stringTable;
}
/**
* Returns the enumeration value table for class ModuleType
*/
protected ModuleType[] getEnumValueTable() {
return enumValueTable;
}
/**
* Return the file extension string for this enumeration.
*/
public String getModuleExtension() {
return moduleExtensionTable[value];
}
/**
* Return an object of the specified value.
*
* @param value a designator for the object.
*/
public static ModuleType getModuleType(int value) {
return enumValueTable[value];
}
/**
* Return the string name of this ModuleType or the integer value if
* outside the bounds of the table
*/
public String toString() {
return (value >= 0 && value <= 4) ? stringTable[value] : String.valueOf(value);
}
/**
* Returns the lowest integer value used by this enumeration value's
* enumeration class.
*
* @return the offset of the lowest enumeration value.
*/
protected int getOffset() {
return 0;
}
} | 1,308 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/shared/CommandType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.shared;
/**
* Defines enumerated values for the available deployment commands.
*
* @version $Rev$ $Date$
*/
public class CommandType {
/**
* The DeploymentManger action operation being processed is distribute.
*/
public static final CommandType DISTRIBUTE = new CommandType(0);
/**
* The DeploymentManger action operation being processed is start.
*/
public static final CommandType START = new CommandType(1);
/**
* The DeploymentManger action operation being processed is stop.
*/
public static final CommandType STOP = new CommandType(2);
/**
* The DeploymentManger action operation being processed is undeploy.
*/
public static final CommandType UNDEPLOY = new CommandType(3);
/**
* he DeploymentManger action operation being processed is redeploy.
*/
public static final CommandType REDEPLOY = new CommandType(4);
private static final CommandType[] enumValueTable = new CommandType[]{
DISTRIBUTE,
START,
STOP,
UNDEPLOY,
REDEPLOY,
};
private static final String[] stringTable = new String[]{
"distribute",
"start",
"stop",
"undeploy",
"redeploy",
};
private int value;
/**
* Construct a new enumeration value with the given integer value.
*/
protected CommandType(int value) {
this.value = value;
}
/**
* Returns this enumeration value's integer value.
*/
public int getValue() {
return value;
}
/**
* Returns the string table for class CommandType
*/
protected String[] getStringTable() {
return stringTable;
}
/**
* Returns the enumeration value table for class CommandType
*/
protected CommandType[] getEnumValueTable() {
return enumValueTable;
}
/**
* Return an object of the specified value.
*
* @param value a designator for the object.
*/
public static CommandType getCommandType(int value) {
return enumValueTable[value];
}
/**
* Return the string name of this CommandType or the integer value if
* outside the bounds of the table
*/
public String toString() {
return (value >= 0 && value <= 4) ? stringTable[value] : String.valueOf(value);
}
/**
* Returns the lowest integer value used by this enumeration value's
* enumeration class.
*
* @return the offset of the lowest enumeration value.
*/
protected int getOffset() {
return 0;
}
}
| 1,309 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/shared/DConfigBeanVersionType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.shared;
/**
* Class DConfigBeanVersionTypes defines enumeration values for the J2EE
* Platform verion number.
*
* @version $Rev$ $Date$
*/
public class DConfigBeanVersionType {
/**
* J2EE Platform version 1.3
*/
public static final DConfigBeanVersionType V1_3 = new DConfigBeanVersionType(0);
/**
* J2EE Platform version 1.3.1
* DO NOT USE THIS, USE V1_3 instead
*/
public static final DConfigBeanVersionType V1_3_1 = new DConfigBeanVersionType(1);
/**
* J2EE Platform version 1.4
*/
public static final DConfigBeanVersionType V1_4 = new DConfigBeanVersionType(2);
/**
* JAVAEE Platform version 1.5
*/
public static final DConfigBeanVersionType V5 = new DConfigBeanVersionType(3);
private static final DConfigBeanVersionType[] enumValueTable = {
V1_3,
V1_3_1,
V1_4,
V5,
};
private static final String[] stringTable = {
"V1_3",
"V1_3_1",
"V1_4",
"V5",
};
private int value;
/**
* Construct a new enumeration value with the given integer value.
*/
protected DConfigBeanVersionType(int value) {
this.value = value;
}
/**
* Returns this enumeration value's integer value.
*/
public int getValue() {
return value;
}
/**
* Returns the string table for class DConfigBeanVersionType
*/
protected String[] getStringTable() {
return stringTable;
}
/**
* Returns the enumeration value table for class DConfigBeanVersionType
*/
protected DConfigBeanVersionType[] getEnumValueTable() {
return enumValueTable;
}
/**
* Return an object of the specified value.
*
* @param value a designator for the object.
*/
public static DConfigBeanVersionType getDConfigBeanVersionType(int value) {
return enumValueTable[value];
}
/**
* Return the string name of this DConfigBeanVersionType or the integer
* value if outside the bounds of the table
*/
public String toString() {
return (value >= 0 && value <= 3) ? getStringTable()[value] : String.valueOf(value);
}
/**
* Returns the lowest integer value used by this enumeration value's
* enumeration class.
*
* @return the offset of the lowest enumeration value.
*/
protected int getOffset() {
return 0;
}
} | 1,310 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/shared | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.shared.factories;
import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
import javax.enterprise.deploy.spi.DeploymentManager;
import javax.enterprise.deploy.spi.factories.DeploymentFactory;
import java.util.Iterator;
import java.util.ArrayList;
/**
* The DeploymentFactoryManager class is a central registry for J2EE
* DeploymentFactory objects. The DeploymentFactoryManager retains references
* to DeploymentFactory objects loaded by a tool. A DeploymentFactory object
* provides a reference to a DeploymentManager. The DeploymentFactoryManager
* has been implemented as a singleton. A tool gets a reference to the
* DeploymentFactoryManager via the getInstance method. The
* DeploymentFactoryManager can return two types of DeploymentManagers, a
* connected DeploymentManager and a disconnected DeploymentManager. The
* connected DeploymentManager provides access to any product resources that
* may be required for configurations and deployment. The method to retrieve a
* connected DeploymentManager is getDeploymentManager. This method provides
* parameters for user name and password that the product may require for user
* authentication. A disconnected DeploymentManager does not provide access to
* a running J2EE product. The method to retrieve a disconnected
* DeploymentManager is getDisconnectedDeploymentManager. A disconnected
* DeploymentManager does not need user authentication information.
*
* @version $Rev$ $Date$
*/
public final class DeploymentFactoryManager {
private static DeploymentFactoryManager instance;
private ArrayList deploymentFactories = new ArrayList();
private DeploymentFactoryManager() {
}
/**
* Retrieve the Singleton DeploymentFactoryManager
*
* @return DeploymentFactoryManager instance
*/
public static DeploymentFactoryManager getInstance() {
if(instance == null) {
instance = new DeploymentFactoryManager();
}
return instance;
}
/**
* Retrieve the lists of currently registered DeploymentFactories.
*
* @return the list of DeploymentFactory objects or an empty array if there are none.
*/
public DeploymentFactory[] getDeploymentFactories() {
return (DeploymentFactory[])deploymentFactories.toArray(new DeploymentFactory[deploymentFactories.size()]);
}
/**
* Retrieves a DeploymentManager instance to use for deployment. The caller
* provides a URI and optional username and password, and all registered
* DeploymentFactories will be checked. The first one to understand the URI
* provided will attempt to initiate a server connection and return a ready
* DeploymentManager instance.
*
* @param uri The uri to check
* @param username An optional username (may be <tt>null</tt> if no
* authentication is required for this platform).
* @param password An optional password (may be <tt>null</tt> if no
* authentication is required for this platform).
*
* @return A ready DeploymentManager instance.
*
* @throws DeploymentManagerCreationException Occurs when the factory
* appropriate to the specified URI was unable to initialize a
* DeploymentManager instance (server down, unable to authenticate,
* etc.).
*/
public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException {
if(uri == null) {
throw new IllegalArgumentException("URI for DeploymentManager should not be null");
}
DeploymentManager manager = null;
for(Iterator i = deploymentFactories.iterator(); i.hasNext();) {
DeploymentFactory factory = (DeploymentFactory)i.next();
if(factory.handlesURI(uri)) {
manager = factory.getDeploymentManager(uri, username, password);
if(manager != null) {
return manager;
}
}
}
throw new DeploymentManagerCreationException("Could not get DeploymentManager; No registered DeploymentFactory handles this URI");
}
/**
* Return a disconnected DeploymentManager instance.
*
* @param uri identifier of the disconnected DeploymentManager to return.
*
* @return A DeploymentManager instance.
*
* @throws DeploymentManagerCreationException occurs if the
* DeploymentManager could not be created.
*/
public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException {
if(uri == null) {
throw new IllegalArgumentException("URI for DeploymentManager should not be null");
}
DeploymentManager manager = null;
for(Iterator i = deploymentFactories.iterator(); i.hasNext();) {
DeploymentFactory factory = (DeploymentFactory)i.next();
if(factory.handlesURI(uri)) {
manager = factory.getDisconnectedDeploymentManager(uri);
if(manager != null) {
return manager;
}
}
}
throw new DeploymentManagerCreationException("Could not get DeploymentManager; No registered DeploymentFactory handles this URI");
}
/**
* Registers a DeploymentFactory so it will be able to handle requests.
*/
public void registerDeploymentFactory(DeploymentFactory factory) {
if(factory == null) {
throw new IllegalArgumentException("DeploymentFactory to register should not be null");
}
if(!deploymentFactories.contains(factory)) {
deploymentFactories.add(factory);
}
}
} | 1,311 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/DConfigBeanRoot.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi;
import javax.enterprise.deploy.model.DDBeanRoot;
/**
* The DConfigBeanRoot interface represent the root of a deployment descriptor.
* A DConfigBeanRoot is associated with a DDRoot object which in turn is associated
* with a specific deployment descriptor file.
*
* <p>Only DConfigBeanRoots are saved or restored by methods in
* DeploymentConfiguration.</p>
*
* @see DeploymentConfiguration
*
* @version $Rev$ $Date$
*/
public interface DConfigBeanRoot extends DConfigBean {
/**
* Return a DConfigBean for a deployment descriptor that is not the module's
* primary deployment descriptor. Web services provides a deployment descriptor
* in addition to the module's primary deployment descriptor. Only the DDBeanRoot
* for this category of secondary deployment descriptors are to be passed as arguments
* through this method.
*
* Web service has two deployment descriptor files, one that defines the web service
* and one that defines a client of a web service. See the Web Service specification for
* the details.
*
* @since 1.1
*
* @param ddBeanRoot represents the root element of a deployment descriptor file.
*
* @return a DConfigBean to be used for processing this deployment descriptor data. Null may be returned
* if no DConfigBean is required for this deployment descriptor.
*/
public DConfigBean getDConfigBean(DDBeanRoot ddBeanRoot);
}
| 1,312 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/DeploymentConfiguration.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi;
import javax.enterprise.deploy.model.DeployableObject;
import javax.enterprise.deploy.model.DDBeanRoot;
import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException;
import java.io.OutputStream;
import java.io.InputStream;
/**
* An interface that defines a container for all the server-specific configuration
* information for a single top-level J2EE module. The DeploymentConfiguration
* object could represent a single stand alone module or an EAR file that contains
* several sub-modules.
*
* @version $Rev$ $Date$
*/
public interface DeploymentConfiguration {
/**
* Returns an object that provides access to the deployment descriptor data
* and classes of a J2EE module.
*
* @return A DeployableObject
*/
public DeployableObject getDeployableObject();
/**
* Returns the top level configuration bean, DConfigBeanRoot, associated with
* the deployment descriptor represented by the designated DDBeanRoot bean.
*
* @param bean The top level bean that represents the associated deployment descriptor.
*
* @return the DConfigBeanRoot for editing the server-specific properties required by the module.
*
* @throws ConfigurationException reports errors in generating a configuration bean
*/
public DConfigBeanRoot getDConfigBeanRoot(DDBeanRoot bean) throws ConfigurationException;
/**
* Remove the root DConfigBean and all its children.
*
* @param bean the top leve DConfigBean to remove.
*
* @throws BeanNotFoundException the bean provided is not in this beans child list.
*/
public void removeDConfigBean(DConfigBeanRoot bean) throws BeanNotFoundException;
/**
* Restore from disk to instantated objects all the DConfigBeans associated with a
* specific deployment descriptor. The beans may be fully or partially configured.
*
* @param inputArchive The input stream for the file from which the DConfigBeans
* should be restored.
* @param bean The DDBeanRoot bean associated with the deployment descriptor file.
*
* @return The top most parent configuration bean, DConfigBeanRoot
*
* @throws ConfigurationException reports errors in generating a configuration bean
*/
public DConfigBeanRoot restoreDConfigBean(InputStream inputArchive, DDBeanRoot bean) throws ConfigurationException;
/**
* Save to disk all the configuration beans associated with a particular deployment
* descriptor file. The saved data may be fully or partially configured DConfigBeans.
* The output file format is recommended to be XML.
*
* @param outputArchive The output stream to which the DConfigBeans should be saved.
* @param bean The top level bean, DConfigBeanRoot, from which to be save.
*
* @throws ConfigurationException reports errors in storing a configuration bean
*/
public void saveDConfigBean(OutputStream outputArchive, DConfigBeanRoot bean) throws ConfigurationException;
/**
* Restore from disk to a full set of configuration beans previously stored.
*
* @param inputArchive The input stream from which to restore the Configuration.
*
* @throws ConfigurationException reports errors in generating a configuration bean
*/
public void restore(InputStream inputArchive) throws ConfigurationException;
/**
* Save to disk the current set configuration beans created for this deployable
* module. It is recommended the file format be XML.
*
* @param outputArchive The output stream to which to save the Configuration.
*
* @throws ConfigurationException reports errors in storing a configuration bean
*/
public void save(OutputStream outputArchive) throws ConfigurationException;
} | 1,313 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/DConfigBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi;
import javax.enterprise.deploy.model.DDBean;
import javax.enterprise.deploy.model.XpathEvent;
import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException;
import java.beans.PropertyChangeListener;
/**
* The interface for configuring a server-specific deployment descriptor, or subset of same.
* A DConfigBean corresponds to a specific location in a standard deployment descriptor,
* typically where values (such as names and roles) are used.
*
* <p>There are three different ways that DConfigBeans are created:</p>
*
* <ul>
* <li><code>DeploymentConfigurator.getDConfigBean(DDBeanRoot)</code> is called by the
* deployment tool to create a DConfigBeanRoot for each deployment descriptor in
* the J2EE application.</li>
* <li><code>DConfigBean.getDConfigBean(DDBean)</code> is called by the deployment
* tool for each DDBean that corresponds to a relative XPath pattern given to the
* deployment tool by the method <code>DConfigBean.getXpaths()</code>.</li>
* <li>Each DConfigBean can structure its configurations as a tree-structure of
* DConfigBeans; a DConfigBean can have properties of type DConfigBean or
* DConfigBean[].</li>
* <ul>
*
* <p>The properties of DConfigBeans are displayed and edited by the deployment tool by
* using the JavaBean Property classes.</p>
*
* @version $Rev$ $Date$
*/
public interface DConfigBean {
/**
* Return the JavaBean containing the deployment descriptor XML text associated with this DConfigBean.
*
* @return The bean class containing the XML text for this DConfigBean.
*/
public DDBean getDDBean();
/**
* Return a list of XPaths designating the deployment descriptor information this
* DConfigBean requires. Each server vendor may need to specify different
* server-specific information. Each String returned by this method is an XPath
* describing a certain portion of the standard deployment descriptor for which
* there is corresponding server-specific configuration.
*
* @return a list of XPath Strings representing XML data to be retrieved or
* <code>null</code> if there are none.
*/
public String[] getXpaths();
/**
* Return the JavaBean containing the server-specific deployment configuration
* information based upon the XML data provided by the DDBean.
*
* @param bean The DDBean containing the XML data to be evaluated.
*
* @return The DConfigBean to display the server-specific properties for the standard bean.
*
* @throws ConfigurationException reports errors in generating a configuration bean.
* This DDBean is considered undeployable to this server until this exception is
* resolved. A suitably descriptive message is required so the user can diagnose
* the error.
*/
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException;
/**
* Remove a child DConfigBean from this bean.
*
* @param bean The child DConfigBean to be removed.
*
* @throws BeanNotFoundException the bean provided is not in the child list of this bean.
*/
public void removeDConfigBean(DConfigBean bean) throws BeanNotFoundException;
/**
* A notification that the DDBean provided in the event has changed and this bean
* or its child beans need to reevaluate themselves.
*
* <p><i>It is advisable, though not declared explicitly in the specification, for a
* DConfigBean to receive change events for itself, and add or remove events for
* its direct children. The DConfigBean implementation should not add or remove
* beans here if it will add or remove those beans again in response to a call to
* getDConfigBean or removeDConfigBean.</i></p>
*
* @see #getDConfigBean
* @see #removeDConfigBean
*
* @param event an event containing a reference to the DDBean which has changed.
*/
public void notifyDDChange(XpathEvent event);
/**
* Register a property listener for this bean.
*
* @param pcl PropertyChangeListener to add
*/
public void addPropertyChangeListener(PropertyChangeListener pcl);
/**
* Unregister a property listener for this bean.
*
* @param pcl Listener to remove.
*/
public void removePropertyChangeListener(PropertyChangeListener pcl);
} | 1,314 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/Target.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi;
/**
* A Target interface represents a single logical core server of one instance of a
* J2EE platform product. It is a designator for a server and the implied location
* to copy a configured application for the server to access.
*
* @version $Rev$ $Date$
*/
public interface Target {
/**
* Retrieve the name of the target server.
*/
public String getName();
/**
* Retrieve other descriptive information about the target.
*/
public String getDescription();
} | 1,315 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/DeploymentManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi;
import javax.enterprise.deploy.spi.exceptions.DConfigBeanVersionUnsupportedException;
import javax.enterprise.deploy.spi.exceptions.TargetException;
import javax.enterprise.deploy.spi.exceptions.InvalidModuleException;
import javax.enterprise.deploy.spi.status.ProgressObject;
import javax.enterprise.deploy.shared.DConfigBeanVersionType;
import javax.enterprise.deploy.shared.ModuleType;
import javax.enterprise.deploy.model.DeployableObject;
import java.io.File;
import java.io.InputStream;
import java.util.Locale;
/**
* The DeploymentManager object provides the core set of functions a J2EE platform
* must provide for J2EE application deployment. It provides server related
* information, such as, a list of deployment targets, and vendor unique runtime
* configuration information.
*
* @version $Rev$ $Date$
*/
public interface DeploymentManager {
/**
* Retrieve the list of deployment targets supported by this DeploymentManager.
*
* @return A list of deployment Target designators the user may select for
* application deployment or <code>null</code> if there are none.
*
* @throws IllegalStateException is thrown when the method is called when
* running in disconnected mode.
*/
public Target[] getTargets() throws IllegalStateException;
/**
* Retrieve the list of J2EE application modules distributed to the identified
* targets and that are currently running on the associated server or servers.
*
* @param moduleType A predefined designator for a J2EE module type.
* @param targetList A list of deployment Target designators the user wants
* checked for module run status.
*
* @return An array of TargetModuleID objects representing the running modules
* or <code>null</code> if there are none.
*
* @throws TargetException occurs when an invalid Target was provided.
* @throws IllegalStateException is thrown when the method is called when running
* in disconnected mode.
*/
public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException;
/**
* Retrieve the list of J2EE application modules distributed to the identified
* targets and that are currently not running on the associated server or servers.
*
* @param moduleType A predefined designator for a J2EE module type.
* @param targetList A list of deployment Target designators the user wants checked
* for module not running status.
*
* @return An array of TargetModuleID objects representing the non-running modules
* or <code>null</code> if there are none.
*
* @throws TargetException occurs when an invalid Target was provided.
* @throws IllegalStateException is thrown when the method is called when running
* in disconnected mode.
*/
public TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException;
/**
* Retrieve the list of all J2EE application modules running or not running on the
* identified targets.
*
* @param moduleType A predefined designator for a J2EE module type.
* @param targetList A list of deployment Target designators the user wants checked
* for module not running status.
*
* @return An array of TargetModuleID objects representing all deployed modules
* running or not or <code>null</code> if there are no deployed modules.
*
* @throws TargetException occurs when an invalid Target was provided.
* @throws IllegalStateException is thrown when the method is called when running
* in disconnected mode.
*/
public TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException;
/**
* Retrieve the object that provides server-specific deployment configuration
* information for the J2EE deployable component.
*
* @param dObj An object representing a J2EE deployable component.
*
* @return An object used to configure server-specific deployment information
*
* @throws InvalidModuleException The DeployableObject is an unknown or unsupported
* component for this configuration tool.
*/
public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException;
/**
* The distribute method performs three tasks; it validates the deployment
* configuration data, generates all container specific classes and interfaces,
* and moves the fully baked archive to the designated deployment targets.
*
* @param targetList A list of server targets the user is specifying this application
* should be deployed to.
* @param moduleArchive The file name of the application archive to be distributed.
* @param deploymentPlan The file containing the runtime configuration information
* associated with this application archive.
*
* @return an object that tracks and reports the status of the distribution process.
*
* @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
*/
public ProgressObject distribute(Target[] targetList, File moduleArchive, File deploymentPlan) throws IllegalStateException;
/**
* The distribute method performs three tasks; it validates the deployment
* configuration data, generates all container specific classes and interfaces,
* and moves the fully baked archive to the designated deployment targets.
*
* @param targetList A list of server targets the user is specifying this application
* should be deployed to.
* @param moduleArchive The stream containing the application archive to be distributed.
* @param deploymentPlan The stream containing the runtime configuration information
* associated with this application archive.
*
* @return an object that tracks and reports the status of the distribution process.
*
* @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
* @deprecated use the following method including the moduletype instead
*/
public ProgressObject distribute(Target[] targetList, InputStream moduleArchive, InputStream deploymentPlan) throws IllegalStateException;
/**
* The distribute method performs three tasks; it validates the deployment
* configuration data, generates all container specific classes and interfaces,
* and moves the fully baked archive to the designated deployment targets.
*
* @param targetList A list of server targets the user is specifying this application
* should be deployed to.
* @param moduleType The module type of the application archive to be distributed.
* @param moduleArchive The stream containing the application archive to be distributed.
* @param deploymentPlan The stream containing the runtime configuration information
* associated with this application archive.
*
* @return an object that tracks and reports the status of the distribution process.
*
* @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
*/
public ProgressObject distribute(Target[] targetList, ModuleType moduleType, InputStream moduleArchive, InputStream deploymentPlan) throws IllegalStateException;
/**
* Start the application running.
*
* <p>Only the TargetModuleIDs which represent a root module are valid for being
* started. A root TargetModuleID has no parent. A TargetModuleID with a parent
* can not be individually started. A root TargetModuleID module and all its
* child modules will be started.</p>
*
* @param moduleIDList An array of TargetModuleID objects representing the modules to be started.
*
* @return An object that tracks and reports the status of the start operation.
*
* @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
*/
public ProgressObject start(TargetModuleID[] moduleIDList) throws IllegalStateException;
/**
* Stop the application running.
*
* <p>Only the TargetModuleIDs which represent a root module are valid for
* being stopped. A root TargetModuleID has no parent. A TargetModuleID
* with a parent can not be individually stopped. A root TargetModuleID
* module and all its child modules will be stopped.</p>
*
* @param moduleIDList An array of TargetModuleID objects representing the modules to be stopped.
*
* @return An object that tracks and reports the status of the stop operation.
*
* @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
*/
public ProgressObject stop(TargetModuleID[] moduleIDList) throws IllegalStateException;
/**
* Remove the application from the target server.
*
* <p>Only the TargetModuleIDs which represent a root module are valid for
* undeployment. A root TargetModuleID has no parent. A TargetModuleID with
* a parent can not be undeployed. A root TargetModuleID module and all its
* child modules will be undeployed. The root TargetModuleID module and all
* its child modules must stopped before they can be undeployed.
*
* @param moduleIDList An array of TargetModuleID objects representing the root
* modules to be undeployed.
*
* @return An object that tracks and reports the status of the stop operation.
*
* @throws IllegalStateException is thrown when the method is called when running in disconnected mode.
*/
public ProgressObject undeploy(TargetModuleID[] moduleIDList) throws IllegalStateException;
/**
* This method designates whether this platform vendor provides application
* redeployment functionality. A value of true means it is supported. False
* means it is not.
*
* @return A value of true means redeployment is supported by this vendor's
* DeploymentManager. False means it is not.
*/
public boolean isRedeploySupported();
/**
* (optional) The redeploy method provides a means for updating currently
* deployed J2EE applications. This is an optional method for vendor
* implementation. Redeploy replaces a currently deployed application with an
* updated version. The runtime configuration information for the updated
* application must remain identical to the application it is updating. When
* an application update is redeployed, all existing client connections to the
* original running application must not be disrupted; new clients will connect
* to the application update. This operation is valid for TargetModuleIDs that
* represent a root module. A root TargetModuleID has no parent. A root
* TargetModuleID module and all its child modules will be redeployed. A child
* TargetModuleID module cannot be individually redeployed. The redeploy
* operation is complete only when this action for all the modules has completed.
*
* @param moduleIDList An array of designators of the applications to be updated.
* @param moduleArchive The file name of the application archive to be redeployed.
* @param deploymentPlan The deployment configuration information associated with
* this application archive.
*
* @return An object that tracks and reports the status of the redeploy operation.
*
* @throws UnsupportedOperationException this optional command is not supported by
* this implementation.
* @throws IllegalStateException is thrown when the method is called when running
* in disconnected mode.
*/
public ProgressObject redeploy(TargetModuleID[] moduleIDList, File moduleArchive, File deploymentPlan) throws UnsupportedOperationException, IllegalStateException;
/**
* (optional) The redeploy method provides a means for updating currently
* deployed J2EE applications. This is an optional method for vendor
* implementation. Redeploy replaces a currently deployed application with an
* updated version. The runtime configuration information for the updated
* application must remain identical to the application it is updating. When
* an application update is redeployed, all existing client connections to the
* original running application must not be disrupted; new clients will connect
* to the application update. This operation is valid for TargetModuleIDs that
* represent a root module. A root TargetModuleID has no parent. A root
* TargetModuleID module and all its child modules will be redeployed. A child
* TargetModuleID module cannot be individually redeployed. The redeploy
* operation is complete only when this action for all the modules has completed.
*
* @param moduleIDList An array of designators of the applications to be updated.
* @param moduleArchive The stream containing the application archive to be redeployed.
* @param deploymentPlan The streeam containing the deployment configuration information
* associated with this application archive.
*
* @return An object that tracks and reports the status of the redeploy operation.
*
* @throws UnsupportedOperationException this optional command is not supported by
* this implementation.
* @throws IllegalStateException is thrown when the method is called when running
* in disconnected mode.
*/
public ProgressObject redeploy(TargetModuleID[] moduleIDList, InputStream moduleArchive, InputStream deploymentPlan) throws UnsupportedOperationException, IllegalStateException;
/**
* The release method is the mechanism by which the tool signals to the
* DeploymentManager that the tool does not need it to continue running
* connected to the platform. The tool may be signaling it wants to run in a
* disconnected mode or it is planning to shutdown. When release is called the
* DeploymentManager may close any J2EE resource connections it had for
* deployment configuration and perform other related resource cleanup. It
* should not accept any new operation requests (i.e., distribute, start, stop,
* undeploy, redeploy. It should finish any operations that are currently in
* process. Each ProgressObject associated with a running operation should be
* marked as released (see the ProgressObject).
*/
public void release();
/**
* Returns the default locale supported by this implementation of
* javax.enterprise.deploy.spi subpackages.
*
* @return the default locale for this implementation.
*/
public Locale getDefaultLocale();
/**
* Returns the active locale this implementation of
* javax.enterprise.deploy.spi subpackages is running.
*
* @return the active locale of this implementation.
*/
public Locale getCurrentLocale();
/**
* Set the active locale for this implementation of
* javax.enterprise.deploy.spi subpackages to run.
*
* @param locale the locale to set
*
* @throws UnsupportedOperationException the provide locale is not supported.
*/
public void setLocale(Locale locale) throws UnsupportedOperationException;
/**
* Returns an array of supported locales for this implementation.
*
* @return the list of supported locales.
*/
public Locale[] getSupportedLocales();
/**
* Reports if this implementation supports the designated locale.
*
* @param locale the locale to check
*
* @return A value of <code>true</code> means it is supported and <code>false</code> it is not.
*/
public boolean isLocaleSupported(Locale locale);
/**
* Returns the J2EE platform version number for which the configuration
* beans are provided. The beans must have been compiled with the J2SE
* version required by the J2EE platform.
*
* @return a DConfigBeanVersionType object representing the platform
* version number for which these beans are provided.
*/
public DConfigBeanVersionType getDConfigBeanVersion();
/**
* Returns <code>true</code> if the configuration beans support the J2EE platform
* version specified. It returns <code>false</code> if the version is not supported.
*
* @param version a DConfigBeanVersionType object representing the J2EE
* platform version for which support is requested.
*
* @return <code>true</code> if the version is supported and 'false if not.
*/
public boolean isDConfigBeanVersionSupported(DConfigBeanVersionType version);
/**
* Set the configuration beans to be used to the J2EE platform version specified.
*
* @param version a DConfigBeanVersionType object representing the J2EE
* platform version for which support is requested.
*
* @throws DConfigBeanVersionUnsupportedException when the requested bean
* version is not supported.
*/
public void setDConfigBeanVersion(DConfigBeanVersionType version) throws DConfigBeanVersionUnsupportedException;
} | 1,316 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/TargetModuleID.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi;
/**
* A TargetModuleID interface represents a unique identifier for a deployed
* application module. A deployable application module can be an EAR, JAR, WAR or
* RAR file. A TargetModuleID can represent a root module or a child module. A
* root module TargetModuleID has no parent. It represents a deployed EAR file or
* standalone module. A child module TargetModuleID represents a deployed sub
* module of a J2EE application. A child TargetModuleID has only one parent, the
* super module it was bundled and deployed with. The identifier consists of the
* target name and the unique identifier for the deployed application module.
*
* @version $Rev$ $Date$
*/
public interface TargetModuleID {
/**
* Retrieve the target server that this module was deployed to.
*
* @return an object representing a server target.
*/
public Target getTarget();
/**
* Retrieve the id assigned to represent the deployed module.
*/
public String getModuleID();
/**
* If this TargetModulID represents a web module retrieve the URL for it.
*
* @return the URL of a web module or null if the module is not a web module.
*/
public String getWebURL();
/**
* Retrieve the identifier representing the deployed module.
*/
public String toString();
/**
* Retrieve the identifier of the parent object of this deployed module. If
* there is no parent then this is the root object deployed. The root could
* represent an EAR file or it could be a stand alone module that was deployed.
*
* @return the TargetModuleID of the parent of this object. A <code>null</code>
* value means this module is the root object deployed.
*/
public TargetModuleID getParentTargetModuleID();
/**
* Retrieve a list of identifiers of the children of this deployed module.
*
* @return a list of TargetModuleIDs identifying the childern of this object.
* A <code>null</code> value means this module has no children
*/
public TargetModuleID[] getChildTargetModuleID();
} | 1,317 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/status/ProgressListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.status;
import java.util.EventListener;
/**
* The listener interface for receiving deployment progress events.
*
* @version $Rev$ $Date$
*/
public interface ProgressListener extends EventListener {
/**
* Invoked when a deployment progress event occurs.
*
* @param event the progress event.
*/
public void handleProgressEvent(ProgressEvent event);
}
| 1,318 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/status/ClientConfiguration.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.status;
import javax.enterprise.deploy.spi.exceptions.ClientExecuteException;
import java.io.Serializable;
/**
* The ClientConfiguration object installs, configures and executes an
* Application Client. This class resolves the settings for installing and
* running the application client.
*
* @version $Rev$ $Date$
*/
public interface ClientConfiguration extends Serializable {
/**
* This method performs an exec and starts the application client running
* in another process.
*
* @throws ClientExecuteException when the configuration is incomplete.
*/
public void execute() throws ClientExecuteException;
}
| 1,319 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/status/DeploymentStatus.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.status;
import javax.enterprise.deploy.shared.CommandType;
import javax.enterprise.deploy.shared.StateType;
import javax.enterprise.deploy.shared.ActionType;
/**
* The DeploymentStatus interface provides information about the progress of a
* deployment action.
*
* @version $Rev$ $Date$
*/
public interface DeploymentStatus {
/**
* Retrieve the StateType value.
*
* @return the StateType object
*/
public StateType getState();
/**
* Retrieve the deployment CommandType of this event.
*
* @return the CommandType Object
*/
public CommandType getCommand();
/**
* Retrieve the deployment ActionType for this event.
*
* @return the ActionType Object
*/
public ActionType getAction();
/**
* Retrieve any additional information about the status of this event.
*
* @return message text
*/
public String getMessage();
/**
* A convience method to report if the operation is in the completed state.
*
* @return <tt>true</tt> if this command has completed successfully
*/
public boolean isCompleted();
/**
* A convience method to report if the operation is in the failed state.
*
* @return <tt>true</tt> if this command has failed
*/
public boolean isFailed();
/**
* A convience method to report if the operation is in the running state.
*
* @return <tt>true</tt> if this command is still running
*/
public boolean isRunning();
} | 1,320 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/status/ProgressEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.status;
import javax.enterprise.deploy.spi.TargetModuleID;
import java.util.EventObject;
/**
* An event which indicates that a deployment status change has occurred.
*
* @see ProgressObject
* @see ProgressListener
*
* @version $Rev$ $Date$
*/
public class ProgressEvent extends EventObject {
private TargetModuleID targetModuleID;
private DeploymentStatus deploymentStatus;
/**
* Creates a new object representing a deployment progress event.
*
* @param source the object on which the Event initially occurred.
* @param targetModuleID the combination of target and module for which the
* event occured.
* @param sCode the object containing the status information.
*/
public ProgressEvent(Object source, TargetModuleID targetModuleID, DeploymentStatus sCode) {
super(source);
this.targetModuleID = targetModuleID;
this.deploymentStatus = sCode;
}
/**
* Retrieves the TargetModuleID for this event.
*
* @return the TargetModuleID
*/
public TargetModuleID getTargetModuleID() {
return targetModuleID;
}
/**
* Retrieves the status information for this event.
*
* @return the object containing the status information.
*/
public DeploymentStatus getDeploymentStatus() {
return deploymentStatus;
}
} | 1,321 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/status/ProgressObject.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.status;
import javax.enterprise.deploy.spi.TargetModuleID;
import javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException;
/**
* The ProgressObject interface tracks and reports the progress of the
* deployment activities: distribute, start, stop, undeploy.
*
* This class has an <i>optional</i> cancel method. The support of the cancel
* function can be tested by the isCancelSupported method.
*
* The ProgressObject structure allows the user the option of polling for
* status or to provide a callback.
*
* @version $Rev$ $Date$
*/
public interface ProgressObject {
/**
* Retrieve the status of this activity.
*
* @return An object containing the status information.
*/
public DeploymentStatus getDeploymentStatus();
/**
* Retrieve the list of TargetModuleIDs successfully processed or created
* by the associated DeploymentManager operation.
*
* @return a list of TargetModuleIDs.
*/
public TargetModuleID[] getResultTargetModuleIDs();
/**
* Return the ClientConfiguration object associated with the
* TargetModuleID.
*
* @return ClientConfiguration for a given TargetModuleID or <tt>null</tt>
* if none exists.
*/
public ClientConfiguration getClientConfiguration(TargetModuleID id);
/**
* Tests whether the vendor supports a cancel operation for this
* deployment action.
*
* @return <tt>true</tt> if this platform allows this action to be
* canceled.
*/
public boolean isCancelSupported();
/**
* (optional) A cancel request on an in-process operation stops all further
* processing of the operation and returns the environment to it original
* state before the operation was executed. An operation that has run to
* completion cannot be cancelled.
*
* @throws OperationUnsupportedException occurs when this optional command
* is not supported by this implementation.
*/
public void cancel() throws OperationUnsupportedException;
/**
* Tests whether the vendor supports a stop operation for the deployment
* action.
*
* @return <tt>true</tt> if this platform allows this action to be
* stopped.
*/
public boolean isStopSupported();
/**
* (optional) A stop request on an in-process operation allows the
* operation on the current TargetModuleID to run to completion but does
* not process any of the remaining unprocessed TargetModuleID objects.
* The processed TargetModuleIDs must be returned by the method
* getResultTargetModuleIDs.
*
* @throws OperationUnsupportedException occurs when this optional command
* is not supported by this implementation.
*/
public void stop() throws OperationUnsupportedException;
/**
* Add a listener to receive progress events on deployment actions.
*
* @param pol the listener to receive events
*/
public void addProgressListener(ProgressListener pol);
/**
* Remove a progress listener.
*
* @param pol the listener to remove
*/
public void removeProgressListener(ProgressListener pol);
}
| 1,322 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/ConfigurationException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.exceptions;
/**
* This exception reports errors in generating a configuration bean.
*
* @version $Rev$ $Date$
*/
public class ConfigurationException extends Exception {
/**
* Creates new <tt>ConfigurationException</tt> without a detail message.
*/
public ConfigurationException() {
super();
}
/**
* Constructs a <tt>ConfigurationException</tt> with the specified detail
* message.
*
* @param msg the detail message.
*/
public ConfigurationException(String msg) {
super(msg);
}
}
| 1,323 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/InvalidModuleException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.exceptions;
/**
* This exception is to report an invalid J2EE deployment module type.
*
* @version $Rev$ $Date$
*/
public class InvalidModuleException extends Exception {
/**
* Creates a new InvalidModuleException.
*
* @param s a string indicating what was wrong with the module type.
*/
public InvalidModuleException(String s) {
super(s);
}
}
| 1,324 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/TargetException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.exceptions;
/**
* This exception is to report bad target designators. Likely causes include:
* the server has been reconfigured since the target was originally provided,
* or the tools is forging targets instead of using the ones provided by the
* DeploymentManager.
*
* @version $Rev$ $Date$
*/
public class TargetException extends Exception {
/**
* Creates a new TargetException.
*
* @param s a string indicating what was wrong with the target.
*/
public TargetException(String s) {
super(s);
}
}
| 1,325 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/DeploymentManagerCreationException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.exceptions;
/**
* This exception is to report problems in returning a DeploymentManager object
* caused by such things as server down, unable to authenticate and the like.
*
* @version $Rev$ $Date$
*/
public class DeploymentManagerCreationException extends Exception {
/**
* Creates a new DeploymentManagerCreationException.
*
* @param s a string providing more information about the problem.
*/
public DeploymentManagerCreationException(String s) {
super(s);
}
}
| 1,326 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/BeanNotFoundException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.exceptions;
/**
* This exception is to report that the bean is not a child of the parent bean.
*
* @version $Rev$ $Date$
*/
public class BeanNotFoundException extends Exception {
/**
* Creates an new BeanNotFoundException object.
*
* @param s a string indicating what was wrong with the target.
*/
public BeanNotFoundException(String s) {
super(s);
}
}
| 1,327 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/DConfigBeanVersionUnsupportedException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.exceptions;
/**
* This exception is to report that there is no support for the DConfigBean
* version requested.
*
* @version $Rev$ $Date$
*/
public class DConfigBeanVersionUnsupportedException extends Exception {
/**
* Creates a new DConfigBeanVersionUnsupportedException.
*/
public DConfigBeanVersionUnsupportedException(String s) {
super(s);
}
}
| 1,328 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/OperationUnsupportedException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.exceptions;
/**
* This exception is to report that the method called is not supported by this
* implementation.
*
* @version $Rev$ $Date$
*/
public class OperationUnsupportedException extends Exception {
/**
* Creates a new OperationUnsupportedException.
*
* @param s a string giving more information about the unsupported
* operation.
*/
public OperationUnsupportedException(String s) {
super(s);
}
}
| 1,329 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/ClientExecuteException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.exceptions;
/**
* This exception reports errors in setting up an application client for
* execution.
*
* @version $Rev$ $Date$
*/
public class ClientExecuteException extends Exception {
/**
* Creates new <tt>ClientExecuteException</tt> without a detail message.
*/
public ClientExecuteException() {
super();
}
/**
* Constructs a <tt>ClientExecuteException</tt> with the specified detail
* message.
*
* @param msg the detail message.
*/
public ClientExecuteException(String msg) {
super(msg);
}
} | 1,330 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/factories/DeploymentFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.spi.factories;
import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
import javax.enterprise.deploy.spi.DeploymentManager;
/**
* The DeploymentFactory interface is a deployment driver for a J2EE plaform
* product. It returns a DeploymentManager object which represents a
* connection to a specific J2EE platform product.
*
* Each application server vendor must provide an implementation of this class
* in order for the J2EE Deployment API to work with their product.
*
* The class implementing this interface should have a public no-argument
* constructor, and it should be stateless (two instances of the class should
* always behave the same). It is suggested but not required that the class
* have a static initializer that registers an instance of the class with the
* DeploymentFactoryManager class.
*
* A <tt>connected</tt> or <tt>disconnected</tt> DeploymentManager can be
* requested. A DeploymentManager that runs connected to the platform can
* provide access to J2EE resources. A DeploymentManager that runs
* disconnected only provides module deployment configuration support.
*
* @see javax.enterprise.deploy.shared.factories.DeploymentFactoryManager
*
* @version $Rev$ $Date$
*/
public interface DeploymentFactory {
/**
* Tests whether this factory can create a DeploymentManager object based
* on the specified URI. This does not indicate whether such an attempt
* will be successful, only whether the factory can handle the uri.
*
* @param uri The uri to check
*
* @return <tt>true</tt> if the factory can handle the uri.
*/
public boolean handlesURI(String uri);
/**
* Returns a <tt>connected</tt> DeploymentManager instance.
*
* @param uri The URI that specifies the connection parameters
* @param username An optional username (may be <tt>null</tt> if no
* authentication is required for this platform).
* @param password An optional password (may be <tt>null</tt> if no
* authentication is required for this platform).
*
* @return A ready DeploymentManager instance.
*
* @throws DeploymentManagerCreationException occurs when a
* DeploymentManager could not be returned (server down, unable
* to authenticate, etc).
*/
public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException;
/**
* Returns a <tt>disconnected</tt> DeploymentManager instance.
*
* @param uri the uri of the DeploymentManager to return.
*
* @return A DeploymentManager <tt>disconnected</tt> instance.
*
* @throws DeploymentManagerCreationException occurs if the
* DeploymentManager could not be created.
*/
public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException;
/**
* Provide a string with the name of this vendor's DeploymentManager.
*
* @return the name of the vendor's DeploymentManager.
*/
public String getDisplayName();
/**
* Provides a string identifying the version of this vendor's
* DeploymentManager.
*
* @return the name of the vendor's DeploymentManager.
*/
public String getProductVersion();
} | 1,331 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/model/XpathListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.model;
/**
* The listener interface for receiving XpathEvents
*
* @version $Rev$ $Date$
*/
public interface XpathListener {
/**
* Invoked when an XpathEvent is generated for this listener
*
* @param xpe The XpathEvent
*/
public void fireXpathEvent(XpathEvent xpe);
}
| 1,332 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/model/XpathEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.model;
import java.beans.PropertyChangeEvent;
/**
* An Event class describing DDBeans being added to or removed from a J2EE
* application, or updated in place.
*
* @version $Rev$ $Date$
*/
public final class XpathEvent {
/**
* Adding a DDBean
*/
public static final Object BEAN_ADDED = new Object();
/**
* Removing a DDBean
*/
public static final Object BEAN_REMOVED = new Object();
/**
* Changing a DDBean
*/
public static final Object BEAN_CHANGED = new Object();
private PropertyChangeEvent pce;
private DDBean bean;
private Object type;
/**
* A description of a change in the DDBean tree.
*
* @param bean The DDBean being added, removed, or updated.
* @param type Indicates whether this is an add, remove, or update event.
*/
public XpathEvent(DDBean bean, Object type) {
this.bean = bean;
this.type = type;
}
/**
* Gets the underlying property change event, with new and
* old values. This is typically used for change events.
* It is not in the public API, but is included in the
* downloadable JSR-88 classes.
* @return PropertyChangeEvent held by this XPathEvent
*/
public PropertyChangeEvent getChangeEvent() {
return pce;
}
/**
* Sets the underlying property change event, with new and
* old values. This is typically used for change events.
* It is not in the public API, but is included in the
* downloadable JSR-88 classes.
*
* @param pce The property change event that triggered this XpathEvent.
*/
public void setChangeEvent(PropertyChangeEvent pce) {
this.pce = pce;
}
/**
* The bean being added/removed/changed.
*
* @return The bean being added/removed/changed.
*/
public DDBean getBean() {
return bean;
}
/**
* Is this an add event?
*
* @return <code>true</code> if this is an add event.
*/
public boolean isAddEvent() {
return BEAN_ADDED == type;
}
/**
* Is this a remove event?
*
* @return <code>true</code> if this is a remove event.
*/
public boolean isRemoveEvent() {
return BEAN_REMOVED == type;
}
/**
* Is this a change event?
*
* @return <code>true</code> if this is a change event.
*/
public boolean isChangeEvent() {
return BEAN_CHANGED == type;
}
} | 1,333 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/model/J2eeApplicationObject.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.model;
import javax.enterprise.deploy.shared.ModuleType;
/**
* J2eeApplicationObject is an interface that represents a J2EE application (EAR);
* it maintains a DeployableObject for each module in the archive.
*
* @version $Rev$ $Date$
*/
public interface J2eeApplicationObject extends DeployableObject {
/**
* Return the DeployableObject of the specified URI designator.
*
* @param uri Describes where to get the module from.
*
* @return the DeployableObject describing the j2ee module at this uri
* or <code>null</code> if there is not match.
*/
public DeployableObject getDeployableObject(String uri);
/**
* Return the all DeployableObjects of the specified type.
*
* @param type The type of module to return.
*
* @return the list of DeployableObjects describing the j2ee modules of
* this type or <code>null</code> if there are no matches.
*/
public DeployableObject[] getDeployableObjects(ModuleType type);
/**
* Return the all DeployableObjects in this application.
*
* @return the DeployableObject instances describing the j2ee modules in
* this application or <code>null</code> if there are none available.
*/
public DeployableObject[] getDeployableObjects();
/**
* Return the list of URIs of the designated module type.
*
* @param type The type of module to return.
*
* @return the Uris of the contained modules or <code>null</code> if there
* are no matches.
*/
public String[] getModuleUris(ModuleType type);
/**
* Return the list of URIs for all modules in the application.
*
* @return the Uris of the contained modules or <code>null</code> if
* the application is completely empty.
*/
public String[] getModuleUris();
/**
* Return a list of DDBean instances based upon an XPath; all deployment
* descriptors of the specified type are searched.
*
* @param type The type of deployment descriptor to query.
* @param xpath An XPath string referring to a location in the deployment descriptor
*
* @return The list of DDBeans or <code>null</code> if there are no matches.
*/
public DDBean[] getChildBean(ModuleType type, String xpath);
/**
* Return the text value from the XPath; search only the deployment descriptors
* of the specified type.
*
* @param type The type of deployment descriptor to query.
* @param xpath The xpath to query for.
*
* @return The text values of this xpath or <code>null</code> if there are no matches.
*/
public String[] getText(ModuleType type, String xpath);
/**
* Register a listener for changes in XPath that are related to this deployableObject.
*
* @param type The type of deployment descriptor to query.
* @param xpath The xpath to listen for.
* @param xpl The listener.
*/
public void addXpathListener(ModuleType type, String xpath, XpathListener xpl);
/**
* Unregister the listener for an XPath.
* @param type The type of deployment descriptor to query.
* @param xpath The xpath to listen for.
* @param xpl The listener.
*/
public void removeXpathListener(ModuleType type, String xpath, XpathListener xpl);
} | 1,334 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/model/DeployableObject.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.model;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Enumeration;
import javax.enterprise.deploy.model.exceptions.DDBeanCreateException;
import javax.enterprise.deploy.shared.ModuleType;
/**
* The DeployableObject interface is an abstract representation of a J2EE deployable
* module (JAR, WAR, RAR, EAR). A DeployableObject provides access to the module's
* deployment descriptor and class files.
*
* @version $Rev$ $Date$
*/
public interface DeployableObject {
/**
* Return the ModuleType of deployment descriptor (i.e., EAR, JAR, WAR, RAR)
* this deployable object represents. Values are found in DeploymentManager.
*
* @return The ModuleType of deployable object
*/
public ModuleType getType();
/**
* Return the top level standard bean representing the root of the deployment descriptor.
*
* @return A standard bean representing the deployment descriptor.
*/
public DDBeanRoot getDDBeanRoot();
/**
* Return an array of standard beans representing the XML content returned based upon the XPath.
*
* @param xpath AAn XPath string identifying the data to be extracted from the deployment descriptor.
*
* @return an array of DDBeans or <code>null</code> if no matching data is found.
*/
public DDBean[] getChildBean(String xpath);
/**
*
* @param xpath An xpath string referring to a location in the deployment descriptor
*
* @return a list XML content or <code>null</code> if no matching data is found.
*/
public String[] getText(String xpath);
/**
* Retrieve the specified class from this deployable module.
* <p>One use: to get all finder methods from an EJB. If the tool is attempting to package a
* module and retrieve a class from the package, the class request may fail. The class may
* not yet be available. The tool should respect the manifest Class-Path entries.</p>
*
* @param className Class to retrieve.
*
* @return Class representation of the class
*/
public Class getClassFromScope(String className);
/**
* A convenience method to return the deployment descriptor
* document version number of the primary deployment descriptor
* for the module (e.g. web.xml, ejb-jar.xml, ra.xml, application.xml,
* and application-client.xml.) The version number for documents
* webservices.xml , webservicesclient.xml and the like are not returned
* by this method. DDBeanRoot.getDDBeanRootVersion should be used
* instead.
*
* This method is being deprecated. DDBeanRoot.getDDBeanRootVersion
* should be used instead.
*
* @deprecated As of version 1.1, replace by DDBeanRoot.getDDBeanRootVersion()
*
* @return a string that is the version number of the XML instance document.
* Null is returned if no version number can be found.
*/
public String getModuleDTDVersion();
/**
* Returns a DDBeanRoot object for the XML instance document named.
* This method should be used to return DDBeanRoot objects for non deployment
* descriptor XML instance documents such as WSDL files.
*
* @since 1.1
*
* @param filename the full path name from the root of the module of the xml
* instance document for which a DDBeanRoot object is to be returned.
*
* @return a DDBeanRoot object for the XML data.
*
* @throws java.io.FileNotFoundException if the named file can not be found
* @throws javax.enterprise.deploy.model.exceptions.DDBeanCreateException
* if an error is encountered creating the DDBeanRoot object.
*/
public DDBeanRoot getDDBeanRoot(String filename) throws FileNotFoundException, DDBeanCreateException;
/**
* Returns an enumeration of the module file entries. All elements in the
* enumeration are of type String. Each String represents a file name relative
* to the root of the module.
*
* @since 1.1
*
* @return an enumeration of the archive file entries.
*/
public Enumeration entries();
/**
* Returns the InputStream for the given entry name.
* The file name must be relative to the root of the module.
*
* @since 1.1
*
* @param name the file name relative to the root of the module.
*
* @return the InputStream for the given entry name or null if not found.
*/
public InputStream getEntry(String name);
} | 1,335 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/model/DDBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.model;
/**
* An interface for beans that represent a fragment of a standard deployment
* descriptor. A link is provided to the J2EE application that includes this bean.
*
* @version $Rev$ $Date$
*/
public interface DDBean {
/**
* Returns the location in the deployment descriptor from which this bean is derived.
*
* @return The XPath of this Bean.
*/
public String getXpath();
/**
* Returns the XML text for by this bean.
*
* @return The XML text for this Bean.
*/
public String getText();
/**
* Returns the ATTLIST ID value for the XML tag defined by the Xpath for this bean.
*
* @return The XML text for this Bean or 'null' if no attribute was specifed with the tag.
*/
public String getId();
/**
* Return the root element for this DDBean.
*
* @return The DDBeanRoot at the root of this DDBean tree.
*/
public DDBeanRoot getRoot();
/**
* Return a list of DDBeans based upon the XPath.
*
* @param xpath An XPath string referring to a location in the same deployment descriptor as this standard bean.
*
* @return a list of DDBeans or 'null' if no matching XML data is found.
*/
public DDBean[] getChildBean(String xpath);
/**
* Return a list of text values for a given XPath in the deployment descriptor.
*
* @param xpath An XPath.
*
* @return The list text values for this XPath or 'null' if no matching XML data is found.
*/
public String[] getText(String xpath);
/**
* Register a listener for a specific XPath.
*
* @param xpath The XPath this listener is to be registered for.
* @param xpl The listener object.
*/
public void addXpathListener(String xpath, XpathListener xpl);
/**
* Unregister a listener for a specific XPath.
*
* @param xpath The XPath this listener is to be registered for.
* @param xpl The listener object.
*/
public void removeXpathListener(String xpath, XpathListener xpl);
/**
* Returns the list of attribute names associated with XML element.
*
* @since 1.1
*
* @return a list of attribute names on this element. Null
* is returned if there are no attributes.
*/
public String[] getAttributeNames();
/**
* Returns the string value of the named attribute.
*
* @since 1.1
*
* @return the value of the attribute. Null is returned
* if there is no such attribute.
*/
public String getAttributeValue(String attrName);
} | 1,336 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/model/DDBeanRoot.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.model;
import javax.enterprise.deploy.shared.ModuleType;
/**
* An interface that represents the root of a standard deployment descriptor.
* A DDBeanRoot is a type of DDBean.
*
* @version $Rev$ $Date$
*/
public interface DDBeanRoot extends DDBean {
/**
* Return the ModuleType of deployment descriptor.
*
* @return The ModuleType of deployment descriptor
*/
public ModuleType getType();
/**
* Return the containing DeployableObject
*
* @return The DeployableObject that contains this deployment descriptor
*/
public DeployableObject getDeployableObject();
/**
* A convenience method to return the DTD version number. The DeployableObject has this information.
*
* Note: the method getDDBeanRootVersion() is preferred to this method.
* @see #getDDBeanRootVersion
*
* @return a string containing the DTD version number
*/
public String getModuleDTDVersion();
/**
* A convenience method to return the version number of an
* XML instance document. This method is replacing the
* method DeployableObject.getModuleDTDVersion, because
* it returns the version number of any J2EE XML instance document
*
* @return <p>a string that is the version number of the XML instance document.
* Null is returned if no version number can be found.</p>
* <p>A module's deployment descriptor file always contains
* a document type identifier, DOCTYPE. The DOCTYPE statement
* contains the module DTD version number in the label of the
* statement.</p>
* <p>The format of the DOCTYPE statement is:</p>
* <pre><!DOCTYPE root_element PUBLIC "-//organization//label//language" "location"></pre>
* <dl>
* <dt>root_element</dt><dd>is the name of the root document in the DTD.</dd>
* <dt>organization</dt><dd>is the name of the organization responsible
* for the creation and maintenance of the DTD
* being referenced.</dd>
* <dt>label</dt><dd>is a unique descriptive name for the public text being
* referenced. </dd>
* <dt>language</dt><dd>is the ISO 639 language id representing the natural
* language encoding of th DTD.</dd>
* <dt>location</dt><dd>is the URL of the DTD.</dd>
* </dl>
* <p>An example J2EE deployment descriptor DOCTYPE statement is:</p>
* <pre><!DOCTYPE application-client PUBLIC
* "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN"
* "http://java.sun.com/dtd/application-client_1_3.dtd"></pre>
* <p>In this example the label is, "DTD J2EE Application Client 1.3",
* and the DTD version number is 1.3. A call to getModuleDTDVersion
* would return a string containing, "1.3".</p>
*/
public String getDDBeanRootVersion();
/**
* Return the XPath for this standard bean. The root XPath is "/".
*
* @return "/" this is the root standard bean.
*/
public String getXpath();
/**
* Returns the filename relative to the root of the module of the XML instance document this
* DDBeanRoot represents.
*
* @since 1.1
*
* @return String the filename relative to the root of the module
*/
public String getFilename();
} | 1,337 |
0 | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/model | Create_ds/geronimo-specs/geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/model/exceptions/DDBeanCreateException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.enterprise.deploy.model.exceptions;
/**
* This exception reports errors in generating a DDBean.
*
* @since 1.1
*
* @version $Rev$ $Date$
*/
public class DDBeanCreateException extends Exception {
/**
* Creates new <code>DDBeanCreateException</code> without detail message.
*/
public DDBeanCreateException() {
super();
}
/**
* Constructs an <code>DDBeanCreateException</code> with the
* specified detail message.
*
* @param msg the detail message.
*/
public DDBeanCreateException(String msg) {
super(msg);
}
} | 1,338 |
0 | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws/WebMethod.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.jws;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target( { ElementType.METHOD })
public @interface WebMethod
{
String operationName() default "";
String action() default "";
boolean exclude() default false;
}; | 1,339 |
0 | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws/HandlerChain.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.jws;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target( { ElementType.TYPE, ElementType.METHOD, ElementType.FIELD })
public @interface HandlerChain
{
String file();
@Deprecated
String name() default "";
}
| 1,340 |
0 | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws/WebParam.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.jws;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target( { ElementType.PARAMETER })
public @interface WebParam
{
public enum Mode
{
IN, OUT, INOUT
};
String name() default "";
String targetNamespace() default "";
Mode mode() default Mode.IN;
boolean header() default false;
String partName() default "";
}; | 1,341 |
0 | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws/WebResult.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.jws;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target( { ElementType.METHOD })
public @interface WebResult
{
String name() default "";
String targetNamespace() default "";
boolean header() default false;
String partName() default "";
}; | 1,342 |
0 | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws/Oneway.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.jws;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface Oneway
{
}
| 1,343 |
0 | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws/WebService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.jws;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target( { ElementType.TYPE })
public @interface WebService
{
String name() default "";
String targetNamespace() default "";
String serviceName() default "";
String wsdlLocation() default "";
String endpointInterface() default "";
String portName() default "";
}; | 1,344 |
0 | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws/soap/InitParam.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.jws.soap;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Deprecated
public @interface InitParam
{
String name();
String value();
} | 1,345 |
0 | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws/soap/SOAPBinding.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.jws.soap;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target( { ElementType.TYPE, ElementType.METHOD })
public @interface SOAPBinding
{
public enum Style
{
DOCUMENT, RPC
}
public enum Use
{
LITERAL, ENCODED
}
public enum ParameterStyle
{
BARE, WRAPPED
}
Style style() default Style.DOCUMENT;
Use use() default Use.LITERAL;
ParameterStyle parameterStyle() default ParameterStyle.WRAPPED;
}
| 1,346 |
0 | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws/soap/SOAPMessageHandlers.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.jws.soap;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Deprecated
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface SOAPMessageHandlers
{
SOAPMessageHandler[] value();
}
| 1,347 |
0 | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws | Create_ds/geronimo-specs/geronimo-ws-metadata_2.0_spec/src/main/java/javax/jws/soap/SOAPMessageHandler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.jws.soap;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Deprecated
public @interface SOAPMessageHandler
{
String className();
String[] headers() default {};
InitParam[] initParams() default {};
String name() default "";
String[] roles() default {};
}
| 1,348 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/TransactionManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public interface TransactionManager {
void begin() throws NotSupportedException, SystemException;
void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, RollbackException, SecurityException, SystemException;
int getStatus() throws SystemException;
Transaction getTransaction() throws SystemException;
void resume(Transaction tobj) throws IllegalStateException, InvalidTransactionException, SystemException;
void rollback() throws IllegalStateException, SecurityException, SystemException;
void setRollbackOnly() throws IllegalStateException, SystemException;
void setTransactionTimeout(int seconds) throws SystemException;
Transaction suspend() throws SystemException;
}
| 1,349 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/HeuristicMixedException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public class HeuristicMixedException extends Exception {
public HeuristicMixedException() {
super();
}
public HeuristicMixedException(String message) {
super(message);
}
}
| 1,350 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/TransactionScoped.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
import javax.enterprise.context.NormalScope;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@NormalScope(passivating = true)
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
public @interface TransactionScoped {
}
| 1,351 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/Status.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public interface Status {
int STATUS_ACTIVE = 0;
int STATUS_MARKED_ROLLBACK = 1;
int STATUS_PREPARED = 2;
int STATUS_COMMITTED = 3;
int STATUS_ROLLEDBACK = 4;
int STATUS_UNKNOWN = 5;
int STATUS_NO_TRANSACTION = 6;
int STATUS_PREPARING = 7;
int STATUS_COMMITTING = 8;
int STATUS_ROLLING_BACK = 9;
}
| 1,352 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/RollbackException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public class RollbackException extends Exception {
public RollbackException() {
super();
}
public RollbackException(String message) {
super(message);
}
}
| 1,353 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/TransactionRolledbackException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
import java.rmi.RemoteException;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public class TransactionRolledbackException extends RemoteException {
public TransactionRolledbackException() {
super();
}
public TransactionRolledbackException(String message) {
super(message);
}
}
| 1,354 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/Transactional.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Inherited
@InterceptorBinding
@Target({TYPE, METHOD})
@Retention(RUNTIME)
public @interface Transactional {
public enum TxType {
REQUIRED, REQUIRES_NEW, MANDATORY, SUPPORTS, NOT_SUPPORTED, NEVER
}
TxType value() default TxType.REQUIRED;
@Nonbinding
public Class[] rollbackOn() default {};
@Nonbinding
public Class[] dontRollbackOn() default {};
}
| 1,355 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/UserTransaction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public interface UserTransaction {
void begin() throws NotSupportedException, SystemException;
void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, RollbackException, SecurityException, SystemException;
int getStatus() throws SystemException;
void rollback() throws IllegalStateException, SecurityException, SystemException;
void setRollbackOnly() throws IllegalStateException, SystemException;
void setTransactionTimeout(int seconds) throws SystemException;
}
| 1,356 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/SystemException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public class SystemException extends Exception {
public int errorCode;
public SystemException() {
super();
}
public SystemException(String message) {
super(message);
}
public SystemException(int errorCode) {
super();
this.errorCode = errorCode;
}
}
| 1,357 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/TransactionSynchronizationRegistry.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public interface TransactionSynchronizationRegistry {
Object getResource(Object key);
boolean getRollbackOnly();
Object getTransactionKey();
int getTransactionStatus();
void putResource(Object key, Object value);
void registerInterposedSynchronization(Synchronization sync);
void setRollbackOnly();
}
| 1,358 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/HeuristicRollbackException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public class HeuristicRollbackException extends Exception {
public HeuristicRollbackException() {
super();
}
public HeuristicRollbackException(String message) {
super(message);
}
}
| 1,359 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/InvalidTransactionException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
import java.rmi.RemoteException;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public class InvalidTransactionException extends RemoteException {
public InvalidTransactionException() {
super();
}
public InvalidTransactionException(String message) {
super(message);
}
}
| 1,360 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/Synchronization.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public interface Synchronization {
void beforeCompletion();
void afterCompletion(int status);
}
| 1,361 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/TransactionalException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
public class TransactionalException extends RuntimeException {
public TransactionalException(final String message, final Throwable cause) {
super(message, cause);
}
}
| 1,362 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/NotSupportedException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public class NotSupportedException extends Exception {
public NotSupportedException() {
super();
}
public NotSupportedException(String message) {
super(message);
}
}
| 1,363 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/TransactionRequiredException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
import java.rmi.RemoteException;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public class TransactionRequiredException extends RemoteException {
public TransactionRequiredException() {
super();
}
public TransactionRequiredException(String message) {
super(message);
}
}
| 1,364 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/HeuristicCommitException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public class HeuristicCommitException extends Exception {
public HeuristicCommitException() {
super();
}
public HeuristicCommitException(String message) {
super(message);
}
}
| 1,365 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/Transaction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction;
import javax.transaction.xa.XAResource;
/**
* @version $Rev: 818591 $ $Date: 2009-09-24 21:03:32 +0200 (jeu 24 sep 2009) $
*/
public interface Transaction {
void commit() throws HeuristicMixedException, HeuristicRollbackException, RollbackException, SecurityException, IllegalStateException, SystemException;
boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException, SystemException;
boolean enlistResource(XAResource xaRes) throws IllegalStateException, RollbackException, SystemException;
int getStatus() throws SystemException;
void registerSynchronization(Synchronization synch) throws IllegalStateException, RollbackException, SystemException;
void rollback() throws IllegalStateException, SystemException;
void setRollbackOnly() throws IllegalStateException, SystemException;
}
| 1,366 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/xa/Xid.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction.xa;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public interface Xid {
int MAXGTRIDSIZE = 64;
int MAXBQUALSIZE = 64;
byte[] getBranchQualifier();
int getFormatId();
byte[] getGlobalTransactionId();
}
| 1,367 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/xa/XAResource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction.xa;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public interface XAResource {
int TMENDRSCAN = 8388608;
int TMFAIL = 536870912;
int TMJOIN = 2097152;
int TMNOFLAGS = 0;
int TMONEPHASE = 1073741824;
int TMRESUME = 134217728;
int TMSTARTRSCAN = 16777216;
int TMSUCCESS = 67108864;
int TMSUSPEND = 33554432;
int XA_RDONLY = 3;
int XA_OK = 0;
void commit(Xid xid, boolean onePhase) throws XAException;
void end(Xid xid, int flags) throws XAException;
void forget(Xid xid) throws XAException;
int getTransactionTimeout() throws XAException;
boolean isSameRM(XAResource xaResource) throws XAException;
int prepare(Xid xid) throws XAException;
Xid[] recover(int flag) throws XAException;
void rollback(Xid xid) throws XAException;
boolean setTransactionTimeout(int seconds) throws XAException;
void start(Xid xid, int flags) throws XAException;
}
| 1,368 |
0 | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction | Create_ds/geronimo-specs/geronimo-jta_1.2_spec/src/main/java/javax/transaction/xa/XAException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.transaction.xa;
/**
* @version $Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (mer 25 oct 2006) $
*/
public class XAException extends Exception {
public static final int XA_RBBASE = 100;
public static final int XA_RBROLLBACK = 100;
public static final int XA_RBCOMMFAIL = 101;
public static final int XA_RBDEADLOCK = 102;
public static final int XA_RBINTEGRITY = 103;
public static final int XA_RBOTHER = 104;
public static final int XA_RBPROTO = 105;
public static final int XA_RBTIMEOUT = 106;
public static final int XA_RBTRANSIENT = 107;
public static final int XA_RBEND = 107;
public static final int XA_NOMIGRATE = 9;
public static final int XA_HEURHAZ = 8;
public static final int XA_HEURCOM = 7;
public static final int XA_HEURRB = 6;
public static final int XA_HEURMIX = 5;
public static final int XA_RETRY = 4;
public static final int XA_RDONLY = 3;
public static final int XAER_ASYNC = -2;
public static final int XAER_RMERR = -3;
public static final int XAER_NOTA = -4;
public static final int XAER_INVAL = -5;
public static final int XAER_PROTO = -6;
public static final int XAER_RMFAIL = -7;
public static final int XAER_DUPID = -8;
public static final int XAER_OUTSIDE = -9;
public int errorCode;
public XAException() {
super();
}
public XAException(String message) {
super(message);
}
public XAException(int errorCode) {
super();
this.errorCode = errorCode;
}
}
| 1,369 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceContexts.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE})
@Retention(RUNTIME)
public @interface PersistenceContexts {
PersistenceContext[] value();
}
| 1,370 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Basic.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static javax.persistence.FetchType.EAGER;
@Target({METHOD, FIELD})
@Retention(RUNTIME)
public @interface Basic {
FetchType fetch() default EAGER;
boolean optional() default true;
}
| 1,371 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedStoredProcedureQuery.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({TYPE})
@Retention(RUNTIME)
@Repeatable(NamedStoredProcedureQueries.class)
public @interface NamedStoredProcedureQuery {
String name();
String procedureName();
StoredProcedureParameter[] parameters() default {};
Class[] resultClasses() default {};
String[] resultSetMappings() default {};
QueryHint[] hints() default {};
}
| 1,372 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Persistence.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.persistence.spi.LoadState;
import javax.persistence.spi.PersistenceProvider;
import javax.persistence.spi.PersistenceProviderResolver;
import javax.persistence.spi.PersistenceProviderResolverHolder;
import javax.persistence.spi.ProviderUtil;
/**
* Bootstrap class to obtain {@link javax.persistence.EntityManagerFactory}
* references.
*
* Contains Geronimo implemented code as required by the JPA spec.
*
* @version $Rev$ $Date$
*/
public class Persistence {
// The following variable is only here for TCK backward compatibility
@Deprecated
protected static final Set<PersistenceProvider> providers = new HashSet<PersistenceProvider>();
// The following string is only here for TCK backward compatibility
@Deprecated
public static final String PERSISTENCE_PROVIDER = "javax.persistence.spi.PeristenceProvider";
static final String PERSISTENCE_PROVIDER_PROPERTY = "javax.persistence.provider";
static final String PERSISTENCE_PROVIDER_SERVICE = "META-INF/services/"
+ PersistenceProvider.class.getName();
public static EntityManagerFactory createEntityManagerFactory(
String persistenceUnitName) {
return createEntityManagerFactory(persistenceUnitName, Collections.EMPTY_MAP);
}
/**
* Geronimo implementation specific code
*/
public static EntityManagerFactory createEntityManagerFactory(
String persistenceUnitName, Map properties) {
EntityManagerFactory factory = null;
Map props = properties;
if (props == null) {
props = Collections.EMPTY_MAP;
}
// get the discovered set of providers
List<PersistenceProvider> providers = getProviders();
/*
* Now, the default JPA2 behavior of loading a provider from our resolver
*
* Note: Change in behavior from 1.0, which always returned exceptions:
* Spec states that a provider "must" return null if it
* cannot fulfill an EMF request, so that if we have more than one
* provider, then the other providers have a chance to return an EMF.
* Now, we will return any exceptions wrapped in a
* PersistenceException to match 1.0 behavior and provide more
* diagnostics to the end user.
*/
// capture any provider returned exceptions
Map<String, Throwable> exceptions = new HashMap<String, Throwable>();
// capture the provider names to use in the exception text if needed
StringBuffer foundProviders = null;
for (PersistenceProvider provider : providers) {
String providerName = provider.getClass().getName();
try {
factory = provider.createEntityManagerFactory(persistenceUnitName, props);
} catch (Exception e) {
// capture the exception details and give other providers a chance
exceptions.put(providerName, e);
}
if (factory != null) {
// we're done
return factory;
} else {
// update the list of providers we have tried
if (foundProviders == null) {
foundProviders = new StringBuffer(providerName);
} else {
foundProviders.append(", ");
foundProviders.append(providerName);
}
}
}
// make sure our providers list is initialized for the exceptions below
if (foundProviders == null) {
foundProviders = new StringBuffer("NONE");
}
/*
* Spec doesn't mention any exceptions thrown by this method if no emf
* returned, but old 1.0 behavior always generated an EMF or exception.
*/
if (exceptions.isEmpty()) {
// throw an exception with the PU name and providers we tried
throw new PersistenceException("No persistence providers available for \"" + persistenceUnitName +
"\" after trying the following discovered implementations: " + foundProviders);
} else {
// we encountered one or more exceptions, so format and throw as a single exception
throw createPersistenceException(
"Explicit persistence provider error(s) occurred for \"" + persistenceUnitName +
"\" after trying the following discovered implementations: " + foundProviders,
exceptions);
}
}
/**
* Geronimo/OpenJPA private helper code for creating a PersistenceException
* @param msg String to use as the exception message
* @param failures Persistence provider exceptions to add to the exception message
* @return PersistenceException
*/
private static PersistenceException createPersistenceException(String msg, Map<String, Throwable> failures) {
String newline = System.getProperty("line.separator");
StringWriter strWriter = new StringWriter();
strWriter.append(msg);
if (failures.size() <= 1) {
// we caught an exception, so include it as the cause
Throwable t = null;
for (String providerName : failures.keySet()) {
t = failures.get(providerName);
strWriter.append(" from provider: ");
strWriter.append(providerName);
break;
}
return new PersistenceException(strWriter.toString(), t);
} else {
// we caught multiple exceptions, so format them into the message string and don't set a cause
strWriter.append(" with the following failures:");
strWriter.append(newline);
for (String providerName : failures.keySet()) {
strWriter.append(providerName);
strWriter.append(" returned: ");
failures.get(providerName).printStackTrace(new PrintWriter(strWriter));
}
strWriter.append(newline);
return new PersistenceException(strWriter.toString());
}
}
public static PersistenceUtil getPersistenceUtil() {
return new PersistenceUtilImpl();
}
public static void generateSchema(String persistenceUnitName, Map properties) {
final List<PersistenceProvider> providers = getProviders();
for (final PersistenceProvider provider : providers) {
if (provider.generateSchema( persistenceUnitName, properties)) {
return;
}
}
throw new PersistenceException("No provider for schema generation of unit '" + persistenceUnitName + "'");
}
private static List<PersistenceProvider> getProviders() {
// get the discovered set of providers
PersistenceProviderResolver resolver =
PersistenceProviderResolverHolder.getPersistenceProviderResolver();
// following will throw PersistenceExceptions for invalid services
return resolver.getPersistenceProviders();
}
/**
* Geronimo implementation specific code
*/
private static class PersistenceUtilImpl implements PersistenceUtil {
/**
* Determines the load state of the attribute of an entity
* @see javax.persistence.PersistenceUtil#isLoaded(java.lang.Object, java.lang.String)
*/
public boolean isLoaded(Object entity, String attributeName) {
// Get the list of persistence providers from the resolver
List<PersistenceProvider> pps = getProviders();
// Iterate through the list using ProviderUtil.isLoadedWithoutReference()
for (PersistenceProvider pp : pps) {
try {
ProviderUtil pu = pp.getProviderUtil();
LoadState ls = pu.isLoadedWithoutReference(entity, attributeName);
if (ls == LoadState.LOADED)
return true;
if (ls == LoadState.NOT_LOADED)
return false;
}
catch (Throwable t) {
// JPA 1.0 providers will not implement the getProviderUtil
// method. Eat the exception and try the next provider.
}
}
// Iterate through the list a second time using ProviderUtil.isLoadedWithReference()
for (PersistenceProvider pp : pps) {
try {
ProviderUtil pu = pp.getProviderUtil();
LoadState ls = pu.isLoadedWithReference(entity, attributeName);
if (ls == LoadState.LOADED)
return true;
if (ls == LoadState.NOT_LOADED)
return false;
}
catch (Throwable t) {
// JPA 1.0 providers will not implement the getProviderUtil
// method. Eat the exception and try the next provider.
}
}
// All providers returned a load state of unknown. Return true.
return true;
}
public boolean isLoaded(Object entity) {
// Get the list of persistence providers from the resolver
List<PersistenceProvider> pps = getProviders();
// Iterate through the list of providers, using ProviderUtil to
// determine the load state
for (PersistenceProvider pp : pps) {
try {
ProviderUtil pu = pp.getProviderUtil();
LoadState ls = pu.isLoaded(entity);
if (ls == LoadState.LOADED)
return true;
if (ls == LoadState.NOT_LOADED)
return false;
// Otherwise, load state is unknown. Query the next provider.
}
catch (Throwable t) {
// JPA 1.0 providers will not implement the getProviderUtil
// method. Eat the exception and try the next provider.
}
}
// All providers returned a load state of unknown. Return true.
return true;
}
}
}
| 1,373 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Temporal.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({METHOD, FIELD})
@Retention(RUNTIME)
public @interface Temporal {
TemporalType value();
}
| 1,374 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerators.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
public @interface TableGenerators {
TableGenerator[] value();
}
| 1,375 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/OneToMany.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import javax.persistence.CascadeType;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static javax.persistence.FetchType.LAZY;
@Target({METHOD, FIELD})
@Retention(RUNTIME)
public @interface OneToMany {
Class targetEntity() default void.class;
CascadeType[] cascade() default {};
FetchType fetch() default LAZY;
String mappedBy() default "";
boolean orphanRemoval() default false;
}
| 1,376 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Lob.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({METHOD, FIELD})
@Retention(RUNTIME)
public @interface Lob {
}
| 1,377 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceContextType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
public enum PersistenceContextType {
TRANSACTION,
EXTENDED
}
| 1,378 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/EntityExistsException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
public class EntityExistsException extends PersistenceException {
public EntityExistsException() {
super();
}
public EntityExistsException(String message) {
super(message);
}
public EntityExistsException(String message, Throwable cause) {
super(message, cause);
}
public EntityExistsException(Throwable cause) {
super(cause);
}
}
| 1,379 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceContext.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.*;
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
@Repeatable(PersistenceContexts.class)
public @interface PersistenceContext {
String name() default "";
String unitName() default "";
PersistenceContextType type() default PersistenceContextType.TRANSACTION;
SynchronizationType synchronization() default SynchronizationType.SYNCHRONIZED;
PersistenceProperty[] properties() default {};
}
| 1,380 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/CacheStoreMode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
public enum CacheStoreMode {
USE,
BYPASS,
REFRESH
}
| 1,381 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/OrderBy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({METHOD, FIELD})
@Retention(RUNTIME)
public @interface OrderBy {
String value() default "";
}
| 1,382 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PostRemove.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({METHOD})
@Retention(RUNTIME)
public @interface PostRemove {}
| 1,383 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Index.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@Target({})
@Retention(RUNTIME)
public @interface Index {
String name() default "";
String columnList();
boolean unique() default false;
}
| 1,384 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/IdClass.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({TYPE})
@Retention(RUNTIME)
public @interface IdClass {
Class value();
}
| 1,385 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/RollbackException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
public class RollbackException extends PersistenceException {
public RollbackException() {
super();
}
public RollbackException(String message) {
super(message);
}
public RollbackException(String message, Throwable cause) {
super(message, cause);
}
public RollbackException(Throwable cause) {
super(cause);
}
}
| 1,386 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PrimaryKeyJoinColumns.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static javax.persistence.ConstraintMode.PROVIDER_DEFAULT;
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
public @interface PrimaryKeyJoinColumns {
PrimaryKeyJoinColumn[] value();
ForeignKey foreignKey() default @ForeignKey(PROVIDER_DEFAULT);
}
| 1,387 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/DiscriminatorColumn.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static javax.persistence.DiscriminatorType.STRING;
@Target({TYPE})
@Retention(RUNTIME)
public @interface DiscriminatorColumn {
String name() default "DTYPE";
DiscriminatorType discriminatorType() default STRING;
String columnDefinition() default "";
int length() default 31;
}
| 1,388 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/ParameterMode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
public enum ParameterMode {
IN,
INOUT,
OUT,
REF_CURSOR,
}
| 1,389 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Id.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({METHOD, FIELD})
@Retention(RUNTIME)
public @interface Id {}
| 1,390 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedQuery.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static javax.persistence.LockModeType.NONE;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({TYPE})
@Retention(RUNTIME)
@Repeatable(NamedQueries.class)
public @interface NamedQuery {
String name();
String query();
LockModeType lockMode() default NONE;
QueryHint[] hints() default {};
}
| 1,391 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedEntityGraph.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({TYPE})
@Retention(RUNTIME)
@Repeatable(NamedEntityGraphs.class)
public @interface NamedEntityGraph {
String name() default "";
NamedAttributeNode[] attributeNodes() default {};
boolean includeAllAttributes() default false;
NamedSubgraph[] subgraphs() default {};
NamedSubgraph[] subclassSubgraphs() default {};
}
| 1,392 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/UniqueConstraint.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({})
@Retention(RUNTIME)
public @interface UniqueConstraint {
String name() default "";
String[] columnNames();
}
| 1,393 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PostLoad.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({METHOD})
@Retention(RUNTIME)
public @interface PostLoad {}
| 1,394 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/MapKeyJoinColumns.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static javax.persistence.ConstraintMode.PROVIDER_DEFAULT;
@Target( { METHOD, FIELD })
@Retention(RUNTIME)
public @interface MapKeyJoinColumns {
MapKeyJoinColumn[] value();
ForeignKey foreignKey() default @ForeignKey(PROVIDER_DEFAULT);
}
| 1,395 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PessimisticLockException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
public class PessimisticLockException extends PersistenceException {
Object entity;
public PessimisticLockException() {
super();
}
public PessimisticLockException(String message) {
super(message);
}
public PessimisticLockException(String message, Throwable cause) {
super(message, cause);
}
public PessimisticLockException(Throwable cause) {
super(cause);
}
public PessimisticLockException(Object entity) {
this.entity = entity;
}
public PessimisticLockException(String message, Throwable cause, Object entity) {
super(message, cause);
this.entity = entity;
}
public Object getEntity() {
return this.entity;
}
}
| 1,396 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/ElementCollection.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static javax.persistence.FetchType.LAZY;
@Target( { METHOD, FIELD })
@Retention(RUNTIME)
public @interface ElementCollection {
Class targetClass() default void.class;
FetchType fetch() default LAZY;
}
| 1,397 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/JoinColumns.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static javax.persistence.ConstraintMode.PROVIDER_DEFAULT;
@Target({METHOD, FIELD})
@Retention(RUNTIME)
public @interface JoinColumns {
JoinColumn[] value();
ForeignKey foreignKey() default @ForeignKey(PROVIDER_DEFAULT);
}
| 1,398 |
0 | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax | Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/LockModeType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//
package javax.persistence;
public enum LockModeType
{
READ,
WRITE,
OPTIMISTIC,
OPTIMISTIC_FORCE_INCREMENT,
PESSIMISTIC_READ,
PESSIMISTIC_WRITE,
PESSIMISTIC_FORCE_INCREMENT,
NONE
}
| 1,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.