com.sun.enterprise.deployment.Application.getBundleDescriptors()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中com.sun.enterprise.deployment.Application.getBundleDescriptors()方法的一些代码示例,展示了Application.getBundleDescriptors()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getBundleDescriptors()方法的具体详情如下:
包路径:com.sun.enterprise.deployment.Application
类名称:Application
方法名:getBundleDescriptors

Application.getBundleDescriptors介绍

[英]Obtain a set of all bundle descriptors, regardless of type
[中]获取一组所有包描述符,无论其类型如何

代码示例

代码示例来源:origin: org.glassfish.deployment/dol

/**
 * Obtain the full set of all the WARs in this application.
 *
 * @return the Set of WebBundleDescriptor objects.
 */
public Set<WebBundleDescriptor> getWebBundleDescriptors() {
  return getBundleDescriptors(WebBundleDescriptor.class);
}

代码示例来源:origin: org.glassfish.deployment/dol

/**
 * Obtain the full set of all the Ejb JAR deployment information in this application.
 *
 * @return the Set of EjbBundleDescriptor objects.
 */
public Set<EjbBundleDescriptor> getEjbBundleDescriptors() {
  return getBundleDescriptors(EjbBundleDescriptor.class);
}

代码示例来源:origin: org.glassfish.deployment/dol

/**
 * Return the Set of app client deploymenbt objects.
 */
public Set<ApplicationClientDescriptor> getApplicationClientDescriptors() {
  return getBundleDescriptors(ApplicationClientDescriptor.class);
}

代码示例来源:origin: org.glassfish.deployment/dol

/**
 * Obtain the full set of all the Ejb JAR deployment information in this application.
 *
 * @return the Set of EjbBundleDescriptor objects.
 */
public Set<ConnectorDescriptor> getRarDescriptors() {
  return getBundleDescriptors(ConnectorDescriptor.class);
}

代码示例来源:origin: org.glassfish.deployment/dol

public int getRarComponentCount() {
  return getBundleDescriptors(ConnectorDescriptor.class).size();
}

代码示例来源:origin: org.glassfish.main.deployment/dol

/**
 * Adds a new abstract role
 */
public void addRole(Role role) {
  for (BundleDescriptor bd : getBundleDescriptors()) {
    bd.addRole(role);
  }
}

代码示例来源:origin: org.glassfish.main.deployment/dol

/**
 * Return all my subcomponents that have a file format (EJB, WAR and
 * AppCLient JAR).
 */
public Set getArchivableDescriptors() {
  Set archivableDescriptors = new OrderedSet();
  archivableDescriptors.addAll(getBundleDescriptors());
  return archivableDescriptors;
}

代码示例来源:origin: org.glassfish.deployment/dol

/**
 * Return the Vector of ejb deployment objects.
 */
public Vector getEjbDescriptors() {
  Vector ejbDescriptors = new Vector();
  for (EjbBundleDescriptor ejbBundleDescriptor : getBundleDescriptors(EjbBundleDescriptor.class)) {
    ejbDescriptors.addAll(ejbBundleDescriptor.getEjbs());
  }
  return ejbDescriptors;
}

代码示例来源:origin: org.glassfish.deployment/dol

/**
 * @return true if this bundle descriptor contains at least one CMP
 *         EntityBean
 */
public boolean containsCMPEntity() {
  for (EjbBundleDescriptor ebd : getBundleDescriptors(EjbBundleDescriptor.class)) {
    if (ebd.containsCMPEntity())
      return true;
  }
  return false;
}

代码示例来源:origin: org.glassfish.main.deployment/dol

/**
 * Remove a web bundle descriptor from this application.
 *
 * @param bundleDescriptor the web bundle descriptor to remove
 */
public void removeBundleDescriptor(BundleDescriptor bundleDescriptor) {
  bundleDescriptor.setApplication(null);
  getBundleDescriptors().remove(bundleDescriptor);
}

代码示例来源:origin: org.glassfish.main.deployment/dol

private static boolean isRAConnectionFactory(String type, Application app) {
  if (app == null) {
    return false;
  }
  for (ConnectorDescriptor cd : app.getBundleDescriptors(ConnectorDescriptor.class)) {
    if (cd.getConnectionDefinitionByCFType(type) != null) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: org.glassfish.main.deployment/dol

/**
 * Return the Vector of ejb deployment objects.
 */
public Vector<EjbDescriptor> getEjbDescriptors() {
  Vector<EjbDescriptor> ejbDescriptors = new Vector<EjbDescriptor>();
  for (EjbBundleDescriptor ejbBundleDescriptor : getBundleDescriptors(EjbBundleDescriptor.class)) {
    ejbDescriptors.addAll(ejbBundleDescriptor.getEjbs());
  }
  return ejbDescriptors;
}

代码示例来源:origin: org.glassfish.deployment/dol

/**
 * Return all my subcomponents that have a file format (EJB, WAR and
 * AppCLient JAR).
 */
public Set getArchivableDescriptors() {
  Set archivableDescriptors = new OrderedSet();
  archivableDescriptors.addAll(getBundleDescriptors());
  return archivableDescriptors;
}

代码示例来源:origin: org.glassfish.main.deployment/dol

private boolean isEmbedded(String raname) {
  String ranameWithRAR = raname + ".rar";
  // check for rar named this
  for (BundleDescriptor bd : application.getBundleDescriptors(ConnectorDescriptor.class)) {
    if(raname.equals(bd.getModuleName()) || ranameWithRAR.equals(bd.getModuleName()))
      return true;
  }
  return false;
}

代码示例来源:origin: org.glassfish.main.deployment/dol

/**
 * Removes the given role.
 */
public void removeRole(Role role) {
  getAppRoles().remove(role);
  for (BundleDescriptor bd : getBundleDescriptors()) {
    bd.removeRole(role);
  }
}

代码示例来源:origin: org.glassfish.webservices/jsr109-impl

private ArrayList<EjbEndpoint> getEjbEndpoints() {
  ejbendpoints = new ArrayList<EjbEndpoint>();
  Application app = deploymentCtx.getModuleMetaData(Application.class);
  Set<BundleDescriptor> bundles = app.getBundleDescriptors();
  for(BundleDescriptor bundle : bundles) {
    collectEjbEndpoints(bundle);
  }
  return ejbendpoints;
}

代码示例来源:origin: org.glassfish.main.deployment/dol

private void parseManagedBeans(AppResources appResources) {
  for (BundleDescriptor bd : application.getBundleDescriptors()) {
    for (ManagedBeanDescriptor managedBean : bd.getManagedBeans()) {
      appResources.storeInNamespace(managedBean.getGlobalJndiName(), (JndiNameEnvironment)bd);
    }
  }
}

代码示例来源:origin: org.glassfish.connectors/connectors-runtime

public void unRegisterDataSourceDefinitions(com.sun.enterprise.deployment.Application application) {
  Set<BundleDescriptor> bundles = application.getBundleDescriptors();
  for (BundleDescriptor bundle : bundles) {
    unRegisterDataSourceDefinitions(bundle);
    Collection<RootDeploymentDescriptor> dds = bundle.getExtensionsDescriptors();
    if(dds != null){
      for(RootDeploymentDescriptor dd : dds){
        unRegisterDataSourceDefinitions(dd);
      }
    }
  }
}

代码示例来源:origin: org.glassfish.connectors/connectors-runtime

public void registerDataSourceDefinitions(com.sun.enterprise.deployment.Application application) {
  String appName = application.getAppName();
  Set<BundleDescriptor> bundles = application.getBundleDescriptors();
  for (BundleDescriptor bundle : bundles) {
    registerDataSourceDefinitions(appName, bundle);
    Collection<RootDeploymentDescriptor> dds = bundle.getExtensionsDescriptors();
    if(dds != null){
      for(RootDeploymentDescriptor dd : dds){
        registerDataSourceDefinitions(appName, dd);
      }
    }
  }
}

代码示例来源:origin: org.glassfish.main.security/security-ee

@Override
public DummyApplication load(SecurityContainer container, DeploymentContext context) {
  DeployCommandParameters dparams = context.getCommandParameters(DeployCommandParameters.class);
  Application app = context.getModuleMetaData(Application.class);
  handleCNonceCacheBSInit(app.getAppName(), app.getBundleDescriptors(WebBundleDescriptor.class), dparams.availabilityenabled);
  return new DummyApplication();
}

相关文章

微信公众号

最新文章

更多

Application类方法