private String getAddedContentKey() { DeploymentAction last = getLastAction(); if (last.getType() != Type.ADD) { // Someone cast to the impl class instead of using the interface cleanup(); throw MESSAGES.invalidPrecedingAction(Type.ADD); } return last.getDeploymentUnitUniqueName(); }
@Override public DeploymentPlanBuilder andRemoveUndeployed() { DeploymentAction last = getLastAction(); if (last.getType() != Type.UNDEPLOY) { // Someone cast to the impl class instead of using the interface cleanup(); throw MESSAGES.invalidPrecedingAction(Type.UNDEPLOY); } DeploymentActionImpl removeMod = DeploymentActionImpl.getRemoveAction(last.getDeploymentUnitUniqueName()); return new DeploymentPlanBuilderImpl(this, removeMod); }