Hi,
This service definition is commented out (I don't know why)
<!--
<service name="addMostRecent"
engine="java"
location="org.ofbiz.content.ContentManagementServices"
invoke="addMostRecent" auth="false">
<description>Get subContent of passed contentId/mapKey or
subContentId</description>
<attribute mode="IN" name="suffix" optional="true" type="String"/>
<attribute mode="IN" name="pk" optional="true"
type="org.ofbiz.entity.GenericValue"/>
<attribute mode="IN" name="session" optional="true"
type="javax.servlet.http.HttpSession"/>
</service>
-->
Should we remove it or is there a reason to keep it?
/**
* addMostRecent
* A service for adding the most recently used of an entity class to the
cache.
* Entities make it to the most recently used list primarily by being
selected for editing,
* either by being created or being selected from a list.
*/
public static Map<String, Object> addMostRecent(DispatchContext dctx,
Map<String, ? extends Object> context) {
//Security security = dctx.getSecurity();
//Delegator delegator = dctx.getDelegator();
//LocalDispatcher dispatcher = dctx.getDispatcher();
//HttpServletRequest request =
(HttpServletRequest)context.get("request");
//String suffix = (String) context.get("suffix");
GenericValue val = (GenericValue)context.get("pk");
GenericPK pk = val.getPrimaryKey();
HttpSession session = (HttpSession)context.get("session");
ContentManagementWorker.mruAdd(session, pk);
return ServiceUtil.returnSuccess();
}
Jacques