congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Application
Code IndexAdd Tabnine to your IDE (free)

How to use
Application
in
org.eclipse.jst.j2ee.application

Best Java code snippets using org.eclipse.jst.j2ee.application.Application (Showing top 20 results out of 315)

origin: org.eclipse/org.eclipse.jst.j2ee

/**
 * This returns Application.gif.
 */
public Object getImage(Object object) {
  String key = null;
  if (((Application) object).eResource() == null)
    return J2EEPlugin.getPlugin().getImage("earFile_obj"); //$NON-NLS-1$
  switch (((Application) object).getVersionID()) {
    case J2EEVersionConstants.J2EE_1_2_ID :
      key = "12_ear_obj"; //$NON-NLS-1$
      break;
    case J2EEVersionConstants.J2EE_1_3_ID :
      key = "13_ear_obj"; //$NON-NLS-1$
      break;
    case J2EEVersionConstants.J2EE_1_4_ID :
    default :
      key = "14_ear_obj"; //$NON-NLS-1$
      break;
  }
  return J2EEPlugin.getPlugin().getImage(key);
}
origin: org.eclipse/org.eclipse.jst.j2ee.core

/**
 * Return true if super returns true, or return whether the app dd contains a module having the
 * uri
 */
public boolean isNestedArchive(String aUri) {
  if (super.isNestedArchive(aUri))
    return true;
  return getDeploymentDescriptor().getFirstModule(aUri) != null;
}
origin: org.eclipse/org.eclipse.jst.j2ee.core

/**
 * @see EARFile
 */
public void pushDownRole(SecurityRole role) {
  if (role == null)
    throw new IllegalArgumentException(CommonArchiveResourceHandler.Parameter_should_not_be_nu_EXC_); // = "Parameter should not be null"
  List modules = getDeploymentDescriptor().getModules();
  for (int i = 0; i < modules.size(); i++) {
    Module m = (Module) modules.get(i);
    pushDownRole(role, m);
  }
}
origin: org.eclipse/org.eclipse.jst.j2ee.core

/**
 * @see com.ibm.etools.commonarchive.EARFile
 */
public SecurityRole addCopyIfNotExists(SecurityRole aRole) {
  Application dd = getDeploymentDescriptor();
  SecurityRole copy = null;
  if (!dd.containsSecurityRole(aRole.getRoleName())) {
    copy = (SecurityRole) EtoolsCopyUtility.createCopy(aRole);
    dd.getSecurityRoles().add(copy);
  }
  return copy;
}
origin: org.eclipse/org.eclipse.jst.j2ee.core

/**
 * validate security constraints, roles, and security role refs.
 */
public void validateSecurity() {
  EList earRoleList = appDD.getSecurityRoles();
  if (!earRoleList.isEmpty())
    validateEarRoles(earRoleList);
  EList moduleList = appDD.getModules();
  if (!moduleList.isEmpty()) {

    for (int i = 0; i < moduleList.size(); i++) {
      Module m = (Module) moduleList.get(i);
      if (m.isEjbModule()) {
        EList ejbRoles = m.getApplication().getSecurityRoles();
        if (!ejbRoles.isEmpty())
          validateEJBRolesWithEARRoles(earRoleList, ejbRoles);
      }// if
      if (m.isWebModule()) {
        EList webRoles = m.getApplication().getSecurityRoles();
        if (!webRoles.isEmpty())
          validateWEBRolesWithEARRoles(earRoleList, webRoles);
      }// if
    }// for
  }// if
}// validateSecurity

origin: org.eclipse/org.eclipse.jst.j2ee.ui

public IFile getAssociatedFile() {
  try {
    if (application != null && application.eResource() != null) {
      return WorkbenchResourceHelperBase.getIFile(application.eResource().getURI());
    }
  } catch (Throwable t) {
  }
  return null;
}
origin: org.eclipse/org.eclipse.jst.j2ee.core

/**
 * @see com.ibm.etools.commonarchive.EARFile
 */
public Module getModule(String aUri, String altDD) {
  return getDeploymentDescriptor().getModule(aUri, altDD);
}
origin: org.eclipse/org.eclipse.jst.j2ee

/**
 * Checks if the nature is consistent with doc type.
 */
protected void validateDocType(EnterpriseArtifactEdit edit,IVirtualComponent module) {
  if (edit == null)
    return;
  if (edit.getJ2EEVersion() >= J2EEVersionConstants.J2EE_1_3_ID && appDD.getVersionID() < J2EEVersionConstants.J2EE_1_3_ID) {
    String[] params = new String[3];
    params[0] = DOCTYPE_1_2;
    params[1] = getResourceName();
    params[2] = DOCTYPE_1_3;
    String tmp = NLS.bind(EARValidationMessageResourceHandler.EAR_INVALID_DOC_TYPE_ERROR_, params);            
    addLocalizedError(tmp, appDD);
  } else if (edit.getJ2EEVersion() < J2EEVersionConstants.J2EE_1_3_ID && appDD.getVersionID() >= J2EEVersionConstants.J2EE_1_3_ID) {
    String[] params = new String[3];
    params[0] = DOCTYPE_1_3;
    params[1] = getResourceName();
    params[2] = DOCTYPE_1_2;
    String tmp = NLS.bind(EARValidationMessageResourceHandler.EAR_INVALID_DOC_TYPE_ERROR_, params);            
    addLocalizedError(tmp, appDD);
  }
}
origin: org.eclipse/org.eclipse.jst.j2ee.core

protected static ModuleFile getModuleFileUsingAltDD(EARFile ear, Resource res) {
  if (res == null)
    return null;
  String uri = res.getURI().toString();
  Module m = ear.getDeploymentDescriptor().getModuleHavingAltDD(uri);
  if (m == null)
    return null;
  ModuleRef ref = ear.getModuleRef(m);
  if (ref == null)
    return null;
  return ref.getModuleFile();
}
origin: org.eclipse/org.eclipse.jst.j2ee

public String getText(Object object) {
  String displayName = ((Application) object).getDisplayName();
  return displayName == null ? ApplicationProvidersResourceHandler.getString("<<No_display_name>>_ERROR_") : displayName; //$NON-NLS-1$
}
origin: org.eclipse/org.eclipse.jst.j2ee.core

/**
 * @generated This field/method will be replaced during code generation
 */
public Application getDeploymentDescriptorGen() {
  if (deploymentDescriptor != null && deploymentDescriptor.eIsProxy()) {
    InternalEObject oldDeploymentDescriptor = (InternalEObject)deploymentDescriptor;
    deploymentDescriptor = (Application)eResolveProxy(oldDeploymentDescriptor);
    if (deploymentDescriptor != oldDeploymentDescriptor) {
      if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.RESOLVE, CommonarchivePackage.EAR_FILE__DEPLOYMENT_DESCRIPTOR, oldDeploymentDescriptor, deploymentDescriptor));
    }
  }
  return deploymentDescriptor;
}
origin: org.eclipse/org.eclipse.jst.j2ee.ui

public IFile getAssociatedFile() {
  try {
    Application application = getParentApplication();
    if (application != null && application.eResource() != null) {
      return WorkbenchResourceHelperBase.getIFile(application.eResource().getURI());
    }
  } catch (Throwable t) {
  }
  return null;
}
origin: org.eclipse/org.eclipse.jst.j2ee

/**
 * This method will return the context root in this application for the passed in web project.
 * 
 * @param webProject
 * @return contextRoot String
 */
public String getWebContextRoot(IProject webProject) {
  verifyOperationSupported();
  if (webProject == null || !J2EEProjectUtilities.isDynamicWebProject(webProject))
    return null;
  IVirtualComponent webComp = ComponentCore.createComponent(webProject);
  String webModuleURI = getModuleURI(webComp);
  if (webModuleURI != null) {
    WebModule webModule = (WebModule) getApplication().getModule(webModuleURI, null);
    if (webModule != null)
      return webModule.getContextRoot();
  }
  return null;
}
origin: org.eclipse/org.eclipse.jst.j2ee.ui

archiveType = EARFILE;
Application app = ((EARFile) anArchive).getDeploymentDescriptor();
if (app.getVersionID() == J2EEVersionConstants.J2EE_1_2_ID)
  archiveType |= J2EE12;
else if (app.getVersionID() == J2EEVersionConstants.J2EE_1_3_ID)
  archiveType |= J2EE13;
else if (app.getVersionID() == J2EEVersionConstants.J2EE_1_4_ID)
  archiveType |= J2EE14;
origin: org.eclipse/org.eclipse.jst.j2ee.core

protected static ModuleFile getModuleFileUsingAltDD(EARFile ear, Resource res) {
  if (res == null)
    return null;
  String uri = res.getURI().toString();
  Module m = ear.getDeploymentDescriptor().getModuleHavingAltDD(uri);
  if (m == null)
    return null;
  ModuleRef ref = ear.getModuleRef(m);
  if (ref == null)
    return null;
  return ref.getModuleFile();
}
origin: org.eclipse/org.eclipse.jst.j2ee.core

public void initRefs(EList refs) {
  List modules = getDeploymentDescriptor().getModules();
  for (int i = 0; i < modules.size(); i++) {
    Module module = (Module) modules.get(i);
    refs.add(createModuleRef(module, null));
  }
}
origin: org.eclipse/org.eclipse.jst.j2ee

for (Iterator referenceItr = implicitUtilityReferences.iterator(); referenceItr.hasNext(); ) {
  reference = (IVirtualReference) referenceItr.next();
  module = application.getFirstModule(reference.getArchiveName());
  if(module != null) 
    referenceItr.remove(); 
origin: org.eclipse/org.eclipse.jst.j2ee.core

if (earFile != null) {
  appDD = earFile.getDeploymentDescriptor();
  if (appDD != null && appDD.eResource() != null && appDD.eResource().isLoaded())
    validate();
  else {
origin: org.eclipse/org.eclipse.jst.j2ee

/**
 * This method will set the context root on the application for the passed in contextRoot. This
 * must be called in a write artifact edit and be saved for changes to be saved.
 * 
 * @param webProject
 * @param aContextRoot
 */
public void setWebContextRoot(IProject webProject, String aContextRoot) {
  verifyOperationSupported();
  if (webProject == null || !J2EEProjectUtilities.isDynamicWebProject(webProject))
    return;
  IVirtualComponent webComp = ComponentCore.createComponent(webProject);
  String webModuleURI = getModuleURI(webComp);
  if (webModuleURI != null) {
    WebModule webModule = (WebModule) getApplication().getModule(webModuleURI, null);
    if (webModule != null)
      webModule.setContextRoot(aContextRoot);
  }
}
public IModelProvider create(IProject project) {
origin: org.eclipse/org.eclipse.jst.j2ee.core

/**
 * @see com.ibm.etools.commonarchive.EARFile
 */
public void rollUpRoles() {
  List modules = getDeploymentDescriptor().getModules();
  for (int i = 0; i < modules.size(); i++) {
    Module aModule = (Module) modules.get(i);
    rollUpRoles(aModule);
  }
}
org.eclipse.jst.j2ee.applicationApplication

Javadoc

The application element is the root element of a J2EE application deployment descriptor.

Most used methods

  • eResource
  • getFirstModule
    Returns the first module matching the specified uri
  • getModules
  • getModule
    Returns the first module matching the specified uri and altDD
  • getVersionID
    This returns the module version id. Compare with J2EEVersionConstants to determine module level
  • containsSecurityRole
  • eIsProxy
  • getDisplayName
  • getModuleHavingAltDD
    Returns the first module where the alt dd matches the specified uri
  • getSecurityRoleNamed
  • getSecurityRoles
  • getVersion
    Returns the value of the 'Version' attribute. If the meaning of the 'Version' attribute isn't clear,
  • getSecurityRoles,
  • getVersion,
  • setDisplayName,
  • setVersion

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Table (org.hibernate.mapping)
    A relational table
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now