Skip to content

Commit

Permalink
Added package-info for new generated types, removed rf-log handler
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Sep 27, 2023
1 parent 7df339b commit 25c2daf
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 16 deletions.
15 changes: 2 additions & 13 deletions user/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@
<sequential>
<!-- Start by copying all sources as-is to a new directory - Note that despite the name, there will be a small bit of servlet-specific code left in here, mostly for the junit runner which will not be updated at this time. -->
<copy todir="${project.build}/no-servlet-src" encoding="${javac.encoding}">
<fileset dir="src" />
<!-- Exclude example log handler, not shipped as part of requestfactory-client or shared -->
<fileset dir="src" excludes="**/RequestFactoryLogHandler.java" />
</copy>

<!-- Move any server-side code that uses servlets to a separate directory, and refactor to replace javax with jakarta -->
Expand Down Expand Up @@ -214,7 +215,6 @@
<replacestring from="package com.google.web.bindery.requestfactory.server" to="package com.google.web.bindery.requestfactory.server.jakarta"/>
<replacestring from="com.google.gwt.user.server.rpc.RPCServletUtils" to="com.google.gwt.user.server.rpc.jakarta.RPCServletUtils"/>
<replacestring from="com.google.web.bindery.requestfactory.shared.LoggingRequest" to="com.google.web.bindery.requestfactory.shared.jakarta.LoggingRequest"/>
<replacestring from="com.google.web.bindery.requestfactory.gwt.client.RequestFactoryLogHandler" to="com.google.web.bindery.requestfactory.gwt.client.jakarta.RequestFactoryLogHandler"/>
<replaceregex pattern="^/\*\*" replace="import com.google.web.bindery.requestfactory.server.*;${line.separator}${line.separator}/**" />
</tokenfilter>
<tokenfilter>
Expand All @@ -234,17 +234,6 @@
</tokenfilter>
</filterchain>
</move>
<move todir="${project.build}/jakarta-src/com/google/web/bindery/requestfactory/gwt/client/jakarta">
<filelist dir="${project.build}/no-servlet-src/com/google/web/bindery/requestfactory/gwt/client">
<file name="RequestFactoryLogHandler.java"/>
</filelist>
<filterchain>
<tokenfilter>
<replacestring from="package com.google.web.bindery.requestfactory.gwt.client" to="package com.google.web.bindery.requestfactory.gwt.client.jakarta"/>
<replacestring from="com.google.web.bindery.requestfactory.shared.LoggingRequest" to="com.google.web.bindery.requestfactory.shared.jakarta.LoggingRequest"/>
</tokenfilter>
</filterchain>
</move>

<!-- add an extra wildcard import to relocated rpc/rf classes that need to reference existing types -->
<replace file="${project.build}/jakarta-src/com/google/gwt/user/server/rpc/jakarta/AbstractXsrfProtectedServiceServlet.java" token="${line.separator}/**" value="import com.google.gwt.user.server.rpc.*;${line.separator}${line.separator}/**" />
Expand Down
23 changes: 23 additions & 0 deletions user/src/com/google/gwt/core/server/jakarta/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2023 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

/**
* Jakarta-specific package for server-only classes. To use these types, be sure
* to use the {@code gwt-servlet-jakarta.jar}.
*
* @since GWT 2.11
*/
package com.google.gwt.core.server.jakarta;
23 changes: 23 additions & 0 deletions user/src/com/google/gwt/logging/server/jakarta/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2023 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

/**
* Jakarta-specific package for server-only classes. To use these types, be sure
* to use the {@code gwt-servlet-jakarta.jar}.
*
* @since GWT 2.11
*/
package com.google.gwt.logging.server.jakarta;
23 changes: 23 additions & 0 deletions user/src/com/google/gwt/user/server/jakarta/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2023 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

/**
* Jakarta-specific package for server-only classes. To use these types, be sure
* to use the {@code gwt-servlet-jakarta.jar}.
*
* @since GWT 2.11
*/
package com.google.gwt.user.server.jakarta;
23 changes: 23 additions & 0 deletions user/src/com/google/gwt/user/server/rpc/jakarta/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2023 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

/**
* Jakarta-specific package for server-only classes. To use these types, be sure
* to use the {@code gwt-servlet-jakarta.jar}.
*
* @since GWT 2.11
*/
package com.google.gwt.user.server.rpc.jakarta;
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@

/**
* Server-side object that handles log messages sent by
* {@link com.google.web.bindery.requestfactory.gwt.client.RequestFactoryLogHandler}
* .
* {@link com.google.web.bindery.requestfactory.gwt.client.RequestFactoryLogHandler}.
* To use this in {@code jakarta.servlet} projects, create your own LoggingRequest
* and RequestFactoryLogHandler types that reference the jakarta variant of this class.
*/
public class Logging {

Expand All @@ -36,7 +37,7 @@ public class Logging {
* Logs a message.
*
* @param logRecordJson a json serialized LogRecord, as provided by
* {@link com.google.gwt.logging.client.JsonLogRecordClientUtil#logRecordAsJsonObject(LogRecord)}
* {@link com.google.gwt.logging.client.JsonLogRecordClientUtil#logRecordAsJson(java.util.logging.LogRecord)} )}
* @throws RemoteLoggingException if logging fails
*/
public static void logMessage(String logRecordJson) throws RemoteLoggingException {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2023 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

/**
* Jakarta-specific package for server-only classes. To use these types, be sure
* to use the {@code gwt-servlet-jakarta.jar}, or
* {@code requestfactory-server-jakarta.jar}.
*
* @since GWT 2.11
*/
package com.google.web.bindery.requestfactory.server.jakarta;

0 comments on commit 25c2daf

Please sign in to comment.