Skip to content

Commit

Permalink
Add jsonws.web.service.public.methods to ide properties
Browse files Browse the repository at this point in the history
  • Loading branch information
gamerson committed Apr 24, 2012
1 parent 73ee9bf commit 8201a1e
Showing 1 changed file with 16 additions and 13 deletions.
Expand Up @@ -158,7 +158,7 @@ public static IPath getPortalDir(IPath appServerDir) {

public static String[] getSupportedHookProperties(IPath runtimeLocation, IPath portalDir)
throws IOException {

IPath hookPropertiesPath =
LiferayTomcatPlugin.getDefault().getStateLocation().append("hook_properties").append(
runtimeLocation.toPortableString().replaceAll("\\/", "_") + "_hook_properties.txt");
Expand Down Expand Up @@ -186,7 +186,7 @@ public static String[] getSupportedHookProperties(IPath runtimeLocation, IPath p

public static String getVersion(IPath location, IPath portalDir)
throws IOException {

IPath versionsInfoPath = LiferayTomcatPlugin.getDefault().getStateLocation().append("version.properties");

String locationKey = location.toPortableString().replaceAll("\\/", "_");
Expand Down Expand Up @@ -294,7 +294,7 @@ public static Context loadContextFile(File contextFile) {
public static void loadHookPropertiesFile(
IPath runtimeLocation, IPath portalDir, File hookPropertiesFile, File errorFile)
throws IOException {

String portalSupportClass = "com.liferay.ide.eclipse.server.core.support.GetSupportedHookProperties";

IPath[] libRoots = new IPath[] { runtimeLocation.append("lib"), runtimeLocation.append("lib/ext") };
Expand All @@ -318,7 +318,7 @@ public static void loadHookPropertiesFile(

public static void loadVersionInfoFile(IPath runtimeLocation, IPath portalDir, File versionInfoFile, File errorFile)
throws IOException {

String portalSupportClass = "com.liferay.ide.eclipse.server.core.support.ReleaseInfoGetVersion";

IPath[] libRoots = new IPath[] { runtimeLocation.append("lib"), runtimeLocation.append("lib/ext") };
Expand All @@ -342,23 +342,23 @@ public static void loadVersionInfoFile(IPath runtimeLocation, IPath portalDir, F

public static IPath modifyLocationForBundle(IPath currentLocation) {
IPath modifiedLocation = null;

if (currentLocation == null || CoreUtil.isNullOrEmpty(currentLocation.toOSString())) {
return null;
}

File location = currentLocation.toFile();

if (location.exists() && location.isDirectory()) {
// check to see if this location contains tomcat dir tomcat-*
File[] files = location.listFiles();

boolean matches = false;

String pattern = "^tomcat-.*";

File tomcatDir = null;

for ( File file : files )
{
if ( file.isDirectory() && file.getName().matches( pattern ) )
Expand All @@ -370,12 +370,12 @@ public static IPath modifyLocationForBundle(IPath currentLocation) {
break;
}
}

if (matches && tomcatDir != null) {
modifiedLocation = new Path(tomcatDir.getPath());
}
}

return modifiedLocation;
}

Expand Down Expand Up @@ -650,6 +650,9 @@ private static File ensurePortalIDEPropertiesExists(
props.put( "auto.deploy.interval", portalServer.getAutoDeployInterval() );
}

// props.put( "json.service.public.methods", "*" );
props.put( "jsonws.web.service.public.methods", "*" );

File file = idePropertiesPath.toFile();

try {
Expand Down

0 comments on commit 8201a1e

Please sign in to comment.