public static Set<Profile> getSupportedProfiles(Project project) { Set<Profile> supportedProfiles = new HashSet<Profile>(); J2eePlatform j2eePlatform = getPlatform(project); if (j2eePlatform != null) { supportedProfiles = j2eePlatform.getSupportedProfiles(); } return supportedProfiles; }
private void checkEnvironment() { if (!checked) { final Object srcType = helper.getStandardPropertyEvaluator(). getProperty(WebProjectProperties.JAVA_SOURCE_BASED); if ("false".equals(srcType)) { isArchive = true; } projectCap = J2eeProjectCapabilities.forProject(project); Profile profile = Profile.fromPropertiesString(eval.getProperty(WebProjectProperties.J2EE_PLATFORM)); isEE5 = profile == Profile.JAVA_EE_5; serverSupportsEJB31 = ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_6_FULL) || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_7_FULL); checked = true; } }
/** * Returns <code>true</code> if the server used by project supports EJB lite. * * @return <code>true</code> if the server used by project supports EJB lite * @since 1.66 * @deprecated use {@link EjbSupport} instead */ @Deprecated public boolean isEjbLiteIncluded() { J2eePlatform platform = ProjectUtil.getPlatform(project); if (platform == null) { return false; } return EjbSupport.getInstance(platform).isEjb31LiteSupported(platform); }
ee7 = true; if ((ee7 && ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_7_FULL)) || (!ee7 && ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_6_FULL))){ UpdateHelper helper = project.getUpdateHelper(); EditableProperties projectProps = helper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);
public boolean hasDefaultPersistenceProvider() { J2eePlatform platform = ProjectUtil.getPlatform(project); if (platform == null) { // server probably not registered, can't resolve whether default provider is supported (see #79856) return false; } Set<Profile> profiles = new HashSet<Profile>(platform.getSupportedProfiles(provider.getJ2eeModule().getType())); profiles.remove(Profile.J2EE_13); profiles.remove(Profile.J2EE_14); if (profiles.isEmpty()) { return false; } JpaSupport support = JpaSupport.getInstance(platform); return support != null && support.getDefaultProvider() != null; } }
J2eePlatform j2eePlatform = ProjectUtil.getPlatform(project); if (j2eePlatform != null) { Set<Profile> serverProfiles = j2eePlatform.getSupportedProfiles();
return false; List<File> platformClasspath = Arrays.asList(ClasspathUtil.getJ2eePlatformClasspathEntries(project, ProjectUtil.getPlatform(project))); List<URL> projectDeps = new ArrayList<URL>(); for (ClassPath.Entry entry : compileCP.entries()) {
return null; List<File> platformClasspath = Arrays.asList(ClasspathUtil.getJ2eePlatformClasspathEntries(project, ProjectUtil.getPlatform(project))); List<URL> projectDeps = new ArrayList<URL>(); for (ClassPath.Entry entry : compileCP.entries()) {