// Licensed Materials - Property of IBM // BI and PM: Mobile // (C) Copyright IBM Corp. 2007, 2020 // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. package processors import com.cognos.mobile.c8.C8PortalTreeQueryMachineFactory; import com.cognos.mobile.c8.C8PortalTreeQueryMachineFactoryImpl; import com.cognos.mobile.c8.IC8Configuration; import com.cognos.mobile.common.CMErrors; import com.cognos.mobile.common.CMException; import com.cognos.mobile.common.CMStringHelper; import com.cognos.mobile.common.CMUrlConstants; import com.cognos.mobile.common.IInputStreamFactory; import com.cognos.mobile.common.IPersistenceStore; import com.cognos.mobile.database.IMobileDatabase; import com.cognos.mobile.location.ConfigParser; import com.cognos.mobile.location.IReverseGeocoder; import com.cognos.mobile.server.core.SCConfiguration; import com.cognos.mobile.server.core.SCRequest; import com.cognos.mobile.server.core.SCResponse; import com.cognos.mobile.server.core.SCUserSession; import com.cognos.mobile.server.handler.AboutHandler; import com.cognos.mobile.server.handler.RenderStatusHandler; import com.cognos.mobile.server.handler.RenderInProgressHandler; import com.cognos.mobile.server.handler.RenderInProgressLegacyHandler; import com.cognos.mobile.server.handler.RenderHandler; import com.cognos.mobile.server.handler.BrowsePortalHandler; import com.cognos.mobile.server.handler.BrowseTreePromptHandler; import com.cognos.mobile.server.handler.CCSHandler; import com.cognos.mobile.server.handler.ChangeTabHandler; import com.cognos.mobile.server.handler.ChunkedRequestHandler; import com.cognos.mobile.server.handler.ContentHandler; import com.cognos.mobile.server.handler.DashboardHandler; import com.cognos.mobile.server.handler.DeleteRenderHandler; import com.cognos.mobile.server.handler.DownloadDBHandler; import com.cognos.mobile.server.handler.DownloadZoomHandler; import com.cognos.mobile.server.handler.DrillThroughHandler; import com.cognos.mobile.server.handler.DrillThrough3Handler; import com.cognos.mobile.server.handler.RunNextPageHandler; import com.cognos.mobile.server.handler.DrillUpDownHandler; import com.cognos.mobile.server.handler.FavouriteHandler; import com.cognos.mobile.server.handler.GetKeyHandler; import com.cognos.mobile.server.handler.GetSettingsHandler; import com.cognos.mobile.server.handler.HistoryHandler; import com.cognos.mobile.server.handler.IHandler; import com.cognos.mobile.server.handler.IPromptFiller; import com.cognos.mobile.server.handler.MRVHandler; import com.cognos.mobile.server.handler.NotificationHandler; import com.cognos.mobile.server.handler.ReportHandler; import com.cognos.mobile.server.handler.ReverseGeocodeHandler; import com.cognos.mobile.server.handler.RunReportHandler; import com.cognos.mobile.server.handler.SavedOutputHandler; import com.cognos.mobile.server.handler.SearchHandler; import com.cognos.mobile.server.handler.StatusHandler; import com.cognos.mobile.server.handler.UserHandler; import com.cognos.mobile.server.handler.ResourceHandler; import com.cognos.mobile.server.handler.ViewRenderHandler; import com.cognos.mobile.server.handler.MobileJSInterfaceHandler; import com.cognos.mobile.server.handler.ImageThumbnailHandler; import com.cognos.mobile.server.handler.SkinsHandler; import com.cognos.mobile.server.location.ReverseGeocodingPromptFiller; import com.cognos.mobile.standardedition.DOM4JUtil; import com.cognos.mobile.standardedition.InputStreamFactory; import com.cognos.mobile.standardedition.StringUtil; import com.cognos.mobile.vm.VM; def CLASS = getClass(); VM.log(CLASS, VM.SEVERITY_DEBUG, "reading location configuration"); IReverseGeocoder reverseGeocoder = ConfigParser.parse(mobileService.getC8Configuration().getConfigurationDirectory() + "/mobile", "location.xml"); if (reverseGeocoder != null) { controller.setLocationPromptFiller(new ReverseGeocodingPromptFiller(reverseGeocoder)); controller.registerHandler(CMUrlConstants.SERVLET_GEO, new ReverseGeocodeHandler(reverseGeocoder)); VM.log(CLASS, VM.SEVERITY_DEBUG, "configured reverse-geocoding prompt-filler"); } else { controller.setLocationPromptFiller(null); VM.log(CLASS, VM.SEVERITY_DEBUG, "no reverse-geocoder specified in location.xml; no prompt-filler configured"); } C8PortalTreeQueryMachineFactory portalTreeQueryMachineFactory = new C8PortalTreeQueryMachineFactoryImpl(); controller.registerHandler(CMUrlConstants.SERVLET_ABOUT, new AboutHandler()); controller.registerHandler(CMUrlConstants.SERVLET_RENDER_STATUS, new RenderStatusHandler(mobileService.getDatabase())); controller.registerHandler(CMUrlConstants.SERVLET_RENDER_IN_PROGRESS, new RenderInProgressLegacyHandler()); controller.registerHandler(CMUrlConstants.SERVLET_BROWSE_PORTAL, new BrowsePortalHandler()); controller.registerHandler(CMUrlConstants.SERVLET_BROWSE_TREE_PROMPT, new BrowseTreePromptHandler(mobileService.getC8Configuration(), mobileService.getInputStreamFactory())); controller.registerHandler(CMUrlConstants.SERVLET_COMPILE_REPORT, new RunReportHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore(), mobileService.getThreadPool(), controller.getLocationPromptFiller(), portalTreeQueryMachineFactory)); controller.registerHandler(CMUrlConstants.SERVLET_DELETE_RENDER, new DeleteRenderHandler(mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore())); controller.registerHandler(CMUrlConstants.SERVLET_DOWNLOAD_DB, new DownloadDBHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore())); controller.registerHandler(CMUrlConstants.SERVLET_DOWNLOAD_ZOOM, new DownloadZoomHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore())); controller.registerHandler(CMUrlConstants.SERVLET_GET_SETTINGS, new GetSettingsHandler(mobileService.getSCConfiguration())); controller.registerHandler(CMUrlConstants.SERVLET_SEARCH, new SearchHandler(mobileService.getSCConfiguration(), mobileService.getC8Configuration())); controller.registerHandler(CMUrlConstants.SERVLET_CCS, new CCSHandler(mobileService.getC8Configuration(), mobileService.getInputStreamFactory())); controller.registerHandler(CMUrlConstants.SERVLET_CHUNKREQUEST, new ChunkedRequestHandler(mobileService.getDatabase())); controller.registerHandler(CMUrlConstants.SERVLET_STATUS, new StatusHandler()); controller.registerHandler(CMUrlConstants.SERVLET_DRILLTHROUGH, new DrillThroughHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore(), mobileService.getThreadPool())); controller.registerHandler(CMUrlConstants.SERVLET_DRILL_UP_DOWN, new DrillUpDownHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore(), mobileService.getThreadPool())); controller.registerHandler(CMUrlConstants.SERVLET_GET_KEY, new GetKeyHandler(mobileService.getSCConfiguration(), mobileService.getDatabase())); controller.registerHandler(CMUrlConstants.SERVLET_VIEW_RENDER, new ViewRenderHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore(), mobileService.getThreadPool(), controller.getLocationPromptFiller())); controller.registerHandler(CMUrlConstants.SERVLET_DASHBOARD, new DashboardHandler(mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore())); controller.registerHandler(CMUrlConstants.SERVLET_FAVOURITE, new FavouriteHandler(mobileService.getDatabase())); // IMPORTANT NOTE! // Ordering of registration of handlers is significant // you will want to put the least likely match first. Example, /user/inbox/2 before /user/inbox // otherwise the wrong handler may try to intercept the call UserHandler uh = new UserHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(),mobileService.getTmpStore()); def formats = "($CMUrlConstants.FORMAT_HTML)|($CMUrlConstants.FORMAT_JSON)|($CMUrlConstants.FORMAT_XML)" def formatsFull = "($CMUrlConstants.FORMAT_HTML)|($CMUrlConstants.FORMAT_HTM)|($CMUrlConstants.FORMAT_JSON)|($CMUrlConstants.FORMAT_XML)|($CMUrlConstants.IMAGEFORMAT_JPEG)|($CMUrlConstants.IMAGEFORMAT_JPG)|($CMUrlConstants.IMAGEFORMAT_PNG)|($CMUrlConstants.IMAGEFORMAT_SVG)|($CMUrlConstants.IMAGEFORMAT_GIF)|($CMUrlConstants.FORMAT_JS)|($CMUrlConstants.FORMAT_CSS)|($CMUrlConstants.FORMAT_DTD)|($CMUrlConstants.FORMAT_ICO)|($CMUrlConstants.FORMAT_PDF)|($CMUrlConstants.FORMAT_CSV)|($CMUrlConstants.FORMAT_XLS)|($CMUrlConstants.FORMAT_XLSX)|($CMUrlConstants.FORMAT_XSD)|($CMUrlConstants.FORMAT_MHT)|($CMUrlConstants.FORMAT_DSSTORE)|($CMUrlConstants.FORMAT_ZIP)|($CMUrlConstants.FORMAT_HTML_TILDE)|($CMUrlConstants.FORMAT_HTM_TILDE)|($CMUrlConstants.FORMAT_JS_TILDE)|($CMUrlConstants.FORMAT_CSS_TILDE)|($CMUrlConstants.FORMAT_DPK)|($CMUrlConstants.FORMAT_CUR)|($CMUrlConstants.FORMAT_TXT)" controller.registerHandler( "$controller.MOBILESERVICE/user/home/(\\d+)\\.?($formats)?", ["renderId", "format"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/home\\.?($formats)?", ["format"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/home2/(\\d+)\\.?($formats)?", ["renderId", "format"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/home2\\.?($formats)?", ["format"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/namespace\\.?($formats)?", ["format"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/inbox/(\\d+)\\.?($formats)?", ["renderId", "format"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/inbox/(cm:|source:)(.*)", ["type", "id"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/inbox\\.?($formats)?", ["format"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/dashboard/(\\d+)\\.?($formats)?", ["renderId", "format"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/fav/(.*?)\\.?($formats)?", ["storeId", "format"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/key/(.*?)/(.*?)\\.?($formats)?", ["userId","platform", "format"], uh); controller.registerHandler( "$controller.MOBILESERVICE/user/key/(.*?)\\.?($formats)?", ["platform", "format"], uh); controller.registerHandler("$controller.MOBILESERVICE/user/logoff", [], uh); ImageThumbnailHandler imageUploadHandler = new ImageThumbnailHandler(mobileService.getDatabase()); controller.registerHandler( "$controller.MOBILESERVICE/thumbUpload\\.?($formats)", ["format"], imageUploadHandler); RenderHandler renderHandler = new RenderHandler(mobileService.getSCConfiguration(), mobileService.getC8Configuration(), isf, tmp, database); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/pages/(\\d+)/thumb\\.?(($CMUrlConstants.IMAGEFORMAT_PNG))?", ["renderId", "page", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/pages/(\\d+)/dashboard\\.?(($CMUrlConstants.IMAGEFORMAT_PNG))?", ["renderId", "page", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/pages/(\\d+)\\.?(($CMUrlConstants.FORMAT_HTML))?", ["renderId", "page", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/pages/(.*?)?", ["renderId", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/report/content/pages//(\\d+)/thumb\\.?(($CMUrlConstants.IMAGEFORMAT_PNG))?", ["renderId", "page", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/report/content/pages//(\\d+)/dashboard\\.?(($CMUrlConstants.IMAGEFORMAT_PNG))?", ["renderId", "page", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/report/content/pages/(\\d+)\\.?(($CMUrlConstants.FORMAT_HTML))?", ["renderId", "page", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/report/content/pages/(.*?)?", ["renderId", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/report/content/(.*?)?", ["renderId", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/images/(\\d+)\\.?(($CMUrlConstants.IMAGEFORMAT_JPEG)|($CMUrlConstants.IMAGEFORMAT_PNG)|($CMUrlConstants.IMAGEFORMAT_SVG))?", ["renderId", "blobId", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/charts/(\\d+)\\.?(($CMUrlConstants.IMAGEFORMAT_JPEG)|($CMUrlConstants.IMAGEFORMAT_PNG)|($CMUrlConstants.IMAGEFORMAT_SVG)|($CMUrlConstants.IMAGEFORMAT_HTML))?", ["renderId", "blobId", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/tables/(\\d+)\\.?(($CMUrlConstants.FORMAT_HTML)|($CMUrlConstants.IMAGEFORMAT_PNG))?", ["renderId", "blobId", "format"], renderHandler); controller.registerHandler( "$controller.MOBILESERVICE/renders/(\\d+)/session/.*\\.?($CMUrlConstants.FORMAT_JSON)", ["renderId","format"], renderHandler); RenderInProgressHandler renderInProgressHandler = new RenderInProgressHandler(database, tmp, mobileService.getC8Configuration()); controller.registerHandler( "${controller.MOBILESERVICE}.absolute/renderinprogress/cancel/(\\d+)\\.?($formats)?", [CMUrlConstants.PARAM_RENDERID[0], "format"], renderInProgressHandler); controller.registerHandler( "${controller.MOBILESERVICE}.absolute/renderinprogress/(\\d+)\\.?($formats)?", [CMUrlConstants.PARAM_RENDERID[0], "format"], renderInProgressHandler); // render in progress check really should be absolute affinity. The following path mapping is registered // because mobile can be installed on top of older BI installs where the caf rules do not allow mobileService.absolute. // in that case the first mob to receive the request adds .absolute to the soapaction and asks dispatcher to redispatch it. // CAF doesn't check dispatcher to dispatcher requests. controller.registerHandler( "${controller.MOBILESERVICE}/(.*)/renderinprogress/cancel/(\\d+)\\.?($formats)?", [CMUrlConstants.PARAM_P64GUID[0], CMUrlConstants.PARAM_RENDERID[0] ,"format"], renderInProgressHandler); controller.registerHandler( "${controller.MOBILESERVICE}/(.*)/renderinprogress/(\\d+)\\.?($formats)?", [CMUrlConstants.PARAM_P64GUID[0], CMUrlConstants.PARAM_RENDERID[0], "format"], renderInProgressHandler); ResourceHandler rsh = new ResourceHandler(mobileService.getDatabase(), mobileService.getAdminNotifier()); controller.registerHandler( "$controller.MOBILESERVICE/resources/(.*?)/(.*?)\\.?($formatsFull)?", [CMUrlConstants.PARAM_RENDERID[0],"hash","format"], rsh); controller.registerHandler( "$controller.MOBILESERVICE/resources/(.*?)\\.?($formatsFull)?", ["hash","format"], rsh); //controller.registerHandler( "$controller.MOBILESERVICE/user/history/page/(\\d+)\\.?($formats)?", ["page", "format"], "processors/history.groovy"); SavedOutputHandler soh = new SavedOutputHandler(mobileService.getDatabase(),mobileService.getInputStreamFactory(),mobileService.getSCConfiguration(), mobileService.getC8Configuration(), mobileService.getTmpStore(),mobileService.getThreadPool()); controller.registerHandler( "$controller.MOBILESERVICE/report/(.*?)/output/(.*?)\\.?($formats)?", ["rStoreId", "soStoreId", CMUrlConstants.PARAM_FORMAT[0]], soh); controller.registerHandler( "$controller.MOBILESERVICE/report/dt3\\.($formats)", ["format"], new DrillThrough3Handler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore(), mobileService.getThreadPool())); controller.registerHandler( "$controller.MOBILESERVICE/report/nextPage\\.($formats)", ["format"], new RunNextPageHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore(), mobileService.getThreadPool())); controller.registerHandler( "$controller.MOBILESERVICE/report/changeTab\\.($formats)", ["format"], new ChangeTabHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore(), mobileService.getThreadPool())); ReportHandler rh = new ReportHandler(controller, scconfig, database, isf, c8config, tmp, threadpool, gte); controller.registerHandler( "$controller.MOBILESERVICE/report/drillthrough/\\.($formats)?", [CMUrlConstants.PARAM_FORMAT[0]], rh); controller.registerHandler( "$controller.MOBILESERVICE/report/ccs/(.*?)/(.*?)\\.?($formats)?", [CMUrlConstants.PARAM_STORE_ID[0], CMUrlConstants.PARAM_CCS_PATH[0], CMUrlConstants.PARAM_FORMAT[0]], rh); controller.registerHandler( "$controller.MOBILESERVICE/report/details/(.*?)\\.?($formats)?", [CMUrlConstants.PARAM_STORE_ID[0], CMUrlConstants.PARAM_FORMAT[0]], rh); controller.registerHandler( "$controller.MOBILESERVICE/report/ios/(.*?)/prompt:(.*?)\\.?($formats)?", [CMUrlConstants.PARAM_STORE_ID[0], CMUrlConstants.PARAM_PROMPT_ID[0], CMUrlConstants.PARAM_FORMAT[0]], rh); controller.registerHandler( "$controller.MOBILESERVICE/report/(.*?)\\.?($formats)?", [CMUrlConstants.PARAM_STORE_ID[0], CMUrlConstants.PARAM_FORMAT[0]], rh); //controller.registerHandler( "$controller.MOBILESERVICE/history\\.?($formats)?", ["format"], "processors/history.groovy"); controller.registerHandler( "$controller.MOBILESERVICE/cm/(.*?)\\.?($formats)?", ["cmpath", "format"], "processors/cm.groovy"); controller.registerHandler( "$controller.MOBILESERVICE/about\\.?($formats)?", ["format"], "processors/about.groovy"); controller.registerHandler( "$controller.MOBILESERVICE/output/(\\d+)/page/(\\d+)\\.?($formats)?", [CMUrlConstants.PARAM_RENDERID[0], CMUrlConstants.PARAM_PAGE_INDEX[0], CMUrlConstants.PARAM_RENDER_OUTPUT_FORMAT[0]], new ViewRenderHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore(), mobileService.getThreadPool(), controller.getLocationPromptFiller())); ContentHandler ch = new ContentHandler(mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration()); controller.registerHandler("$controller.MOBILESERVICE/content\\.?(xml|json)?", [CMUrlConstants.PARAM_FORMAT[0]], ch); // controller.registerHandler("$controller.MOBILESERVICE/content/([/a-zA-Z0-9]*)\\.?(xml|json)?", [CMUrlConstants.PARAM_ATOM_LINK[0],CMUrlConstants.PARAM_FORMAT[0]], "processors/content.groovy"); controller.registerHandler("$controller.MOBILESERVICE/content/(.+?)\\.?(xml|json)?", ["sourcepath", "format"], ch); def imageFormats = "(($CMUrlConstants.IMAGEFORMAT_PNG)|($CMUrlConstants.IMAGEFORMAT_JPEG)|($CMUrlConstants.IMAGEFORMAT_HTML))" DownloadZoomHandler dzh = new DownloadZoomHandler(mobileService.getSCConfiguration(), mobileService.getDatabase(), mobileService.getInputStreamFactory(), mobileService.getC8Configuration(), mobileService.getTmpStore()); controller.registerHandler("$controller.MOBILESERVICE/zoom/output/(\\d+)\\.?($imageFormats)?", [CMUrlConstants.PARAM_RENDERID[0], "format"], dzh); controller.registerHandler("$controller.MOBILESERVICE/zoom/output/(\\d+)/width/(\\d+)\\.?($imageFormats)?", [ CMUrlConstants.PARAM_RENDERID[0], "width", "format" ], dzh); controller.registerHandler("$controller.MOBILESERVICE/zoom/output/(\\d+)/height/(\\d+)\\.?($imageFormats)?", [ CMUrlConstants.PARAM_RENDERID[0], "height" ], dzh); HistoryHandler hh = new HistoryHandler(mobileService.getDatabase()); controller.registerHandler("$controller.MOBILESERVICE/history/(short|full)/(first|rest)?\\.?(xml|json)?", [CMUrlConstants.PARAM_HISTORY_LIST_TYPE[0], CMUrlConstants.PARAM_HISTORY_START[0],CMUrlConstants.PARAM_FORMAT[0]], hh); controller.registerHandler("$controller.MOBILESERVICE/history/(en|cs|da|de|es|fi|fr|hr|hu|it|ja|ko|nl|pl|pt|ro|ru|sk|sv|th|tr|zh-cn|zh-tw)/(short|full)/(first|rest)?\\.?(xml|json)?", [CMUrlConstants.PARAM_HISTORY_LANG[0],CMUrlConstants.PARAM_HISTORY_LIST_TYPE[0], CMUrlConstants.PARAM_HISTORY_START[0],CMUrlConstants.PARAM_FORMAT[0]], hh); MRVHandler mrvh = new MRVHandler(mobileService.getDatabase()); controller.registerHandler("$controller.MOBILESERVICE/mrv\\.?(xml|json)?", [CMUrlConstants.PARAM_FORMAT[0]], mrvh); SearchHandler sh = new SearchHandler(mobileService.getSCConfiguration(),mobileService.getC8Configuration()); controller.registerHandler("$controller.MOBILESERVICE/search\\.?(xml|json)", [CMUrlConstants.PARAM_FORMAT[0]], sh); controller.registerHandler( "$controller.MOBILESERVICE/resources2\\.?($formatsFull)?", ["format"], "processors/resource2.groovy"); MobileJSInterfaceHandler mjs = new MobileJSInterfaceHandler(mobileService.getC8Configuration()); controller.registerHandler("$controller.MOBILESERVICE/mobile_interface\\.js", [], mjs); def formats2 = "($CMUrlConstants.FORMAT_HTML)|($CMUrlConstants.FORMAT_JSON)|($CMUrlConstants.FORMAT_XML | $CMUrlConstants.FORMAT_TXT)" SkinsHandler suh = new SkinsHandler(mobileService.getSCConfiguration(), mobileService.getDatabase()); controller.registerHandler("$controller.MOBILESERVICE/skins/upload\\.?($formats)", ["format"], suh); controller.registerHandler("$controller.MOBILESERVICE/skins/browse\\.?($formats)", ["format"], suh); controller.registerHandler("$controller.MOBILESERVICE/skins/delete\\.?($formats2)", [CMUrlConstants.PARAM_RENDERID[1], "format"], suh); NotificationHandler nh = new NotificationHandler(mobileService.getAdminNotifier()); controller.registerHandler( "$controller.MOBILESERVICE/notify\\.?($formats)?", ["format"], nh);