I need to fetch data of CATENTDESCOVR using Databean.
Is there any databean provided by IBM to get the data?
I am using IBM WebSphere Commerce V7.0 Feature Pack 8
this is good question and here below is the explanation how CATENTDESCOVR works , this answer is based on WCS 7.0 , FEP 7 . but I believe fep 8 have same api , i don't think IBM enhanced this in fep8!
the information of CATENTDESCOVR are indexed and stored in solr, BUT the reason for indexing is just for searching and spellcheck, you can see how we are copying these info to defultSearch and spellCheck to make these values searchable and to be part of spellcheck (end of schema.xml).
if you look at how these data are indexed and stored in solr in schema.xml you will find following line
<!--
Catentry's description override: map to table CATENTDESCOVR
-->
<field name="nameOverride" type="wc_text" indexed="true" stored="true" multiValued="true"/>
<field name="shortDescriptionOverride" type="wc_text" indexed="true" stored="true" multiValued="true"/>
<field name="keywordOverride" type="wc_text" indexed="true" stored="true" multiValued="true"/>
please note here the multiValued="true" , this means that if you have multible stores belongs to same Esite , the solr index the nameOvr , descOvr as multivalued for that catentryId , but solr have no idea which overridden name belongs to which store , that bean said , IBM solr index the master catalog data not store specific data .
this brings the question how the overridden name is shown per store in store front?
the answer is by utilizing WC-Search post-processor:
com.ibm.commerce.foundation.server.services.rest.search.postprocessor.solr.SolrRESTSearchCatalogEntryViewDescriptionQueryPostprocessor
if you look at the implementation of this postprocessor you will find the following high level steps :
1- get the catOvrGrpId by:
catOvrGrpId = CatalogOverrideHelper.getOverrideGroupIdForStore(this.iStoreId)
2- get the required overridden data by calling the DSL service:
JDBCQueryService service = new JDBCQueryService("com.ibm.commerce.catalog");
queryParameters.put("language", langIds);
queryParameters.put("UniqueID", catEntryUniqueIDs);
queryParameters.put("catOverrideGroupID", groupIds);
service.executeQuery("IBM_Get_CatentryDescOverride_By_LangId_And_CatentryId_And_GroupId",
queryParameters);
3- convert the array list returned to JSON compatible result:
populateOverrideCatalogEntries((List)listOfPhysicalObjects, catalogEntryViews);
you can reused the codes above and try to de-compile SolrRESTSearchCatalogEntryViewDescriptionQueryPostprocessor to understand how you can read these information from database.
the query for IBM_Get_CatentryDescOverride_By_LangId_And_CatentryId_And_GroupId is exist under Search/xml/config/com.ibm.commerce.catalog/wc-query-utilities.tpl
Hope this will be informative for you.
Thanks
Abed
The short answer is that there isn't a DataBean for accessing this data.
The [beginning of the] long answer is that you need to use the BOD+DSL layers in order to access such data.
Either through JSP using the getData tag (Aurora uses this tag extensively) or using Java code (sometimes using XPath expressions...).
You can also trace the query: see here.
However, to my understanding, the idea of overrides is that they are transparent to the front-end. I.e. the description overrides are replacing the main descriptions when they are set-up. see here
Not sure what you're trying to do with accessing this data directly. Override WCS logic?
The CATENTDESCOVR will already have been indexed in your solr core.
Look in solr\home\MC_10001\en_US\CatalogEntry\conf, for in the wc-data-config.xml, and you can see it being mapped into the core.
When you request data from solr, one of the Post processing filters defined in the wc-search.xml of the Search EAR project will fill in the override value as the "name" or "shortdesc" of the returned values.
So, you really only need to call the rest service as normal to get this value. Provided ofcourse you are wanting it from the frontend.
If you need it backend, you can use the CatalogEntryFacadeClient to perform the solr query.
Related
I'm looking for a clever solution to store information about the tabular model model processing history. I tried to use extended events tracking for that but don't know how to find a model name in that logs.
Any ideas would be really helpful.
Thx in advance !
You can query the $SYSTEM.MDSCHEMA_CUBES DMV and check the LAST_DATA_UPATE column to find when the Tabular model was last processed. This only returns the results for the model that you're in so filtering the model isn't necessary. If you're looking to use XMLA, you execute the example request below as an XMLA query in SSMS. Like querying the prior mentioned DMV directly, this will run in the context of the model your connected to.
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>MDSCHEMA_CUBES</RequestType>
<Restrictions />
<Properties>
<PropertyList>
<Catalog>YourTabularModelName</Catalog>
</PropertyList>
</Properties>
</Discover>
I am new to jaspersoft reporting. I am currently designing and developing reports by considering following requirements.
I want to create template based reports where all dynamic parameters I need to pass in SQL query.
I was going through japsersoft reporting I found that we can create join views and cache data by creating domains. So that it reduces hits at db level.
While creating report I found that I cant execute SQL script on Domain objects.
Please advice whether I am on right track or not.
Basically I want to query on cached data such as domain view instead of hitting DB directly.
Please suggest if any workaround is available for this problem.
Please note, although JasperReports Server manages a cache for Ad Hoc Views and Ad Hoc Reports running on Domains, running a JRXML report (e.g. designed in Jaspersoft Studio) on a Domain does not guarantee hitting that cache.
You also have the option of using a layer that provides caching between JasperReports Server and your database. For example, support has been recently added for TIBCO Data Virtualization (not a free product) in v.7, see https://www.jaspersoft.com/introducing-jaspersoft-7.
In any case, Domains are not relational databases and therefore do not support straight SQL.
You can use the "Domain query language" though, which offers a subset of the features of SQL. The easiest way to write a query is using Jaspersoft Studio and selecting "domain" in the Language dropdown (top-left corner of the Dataset and Query Dialog, indicated by the red arrow in the screenshot below from Studio 6.4.0):
For example the design above (which uses the Supermart Domain, provided with the sample data) will generate this query and the required "dynamic" parameter as you requested – in this case a Collection as the filter is 'Is One Of' which can take multiple values:
<query>
<queryFields>
<queryField id="sales_fact_ALL.sales__product.sales__product__product_name"/>
<queryField id="sales_fact_ALL.sales_fact_ALL__store_sales_2013"/>
</queryFields>
<queryFilterString>sales_fact_ALL.sales__store.sales__store__region.sales__store__region__sales_country in sales__store__region__sales_country_0</queryFilterString>
</query>
See here for another example of a query (current version of docs based on 7.1.0 release), in this case for use with the REST API: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v710/queryexecutor-service
The queryFilterString tag follows the DomEL syntax as documented here (also for 7.1.0): https://community.jaspersoft.com/documentation/tibco-jasperreports-server-user-guide/v71/domel-syntax
I am using Jasper Server 6.3 Community Edition. I have a set of reports that I want to be able to execute against different databases. I have a data adapter defined for each database. I want to be able to execute any of these reports via the rest 2 API and just tell it to use a different data adapter.
The piece of XML that is pertinent to this setting in the jrxml is:
<property name="net.sf.jasperreports.data.adapter" value="common\test.xml"/>
The ideal situation would be, to be able to pass any value I want to replace common\test.xml
From what I can tell though, there is no built in parameter to set the data adapter, and one cannot use a parameter to set this either. In other words this won't work:
<property name="net.sf.jasperreports.data.adapter" value="$P!{data_adapter_path}"/>
So how can the net.sf.jasperreports.data.adapter value be set dynamically using the rest 2 API?
The easiest solution would be to upgrade to at least JasperReports Server 6.4.0 where you could use a propertyExpression instead of property, like so (I am posting only the relevant fragment):
<propertyExpression name="net.sf.jasperreports.data.adapter"><![CDATA[$P{DataAdapterLocation}]]></propertyExpression>
<parameter name="DataAdapterLocation" class="java.lang.String" evaluationTime="Early">
<defaultValueExpression><![CDATA["default/path/to/DataAdapterFile"]]></defaultValueExpression>
</parameter>
The evaluationTime="Early" on the parameter is essential for this to work.
Another but complex solution, that would not require an upgrade, would involve creating JDBC Data Sources(via interface or REST API) and assigning them to the appropriate Report Unit. This post shows how you could achieve that by using the jrs-rest-java-client .
Right now I am working on a project to fetch data from a SharePoint list using SOAP API. I tried and successfully fetches the complete list, but now I want to fetch some specific data that is updated after a specific date.
Is this possible to fetch such data using SOAP query. I can see last update filed when I view single item at the bottom. Is this some how possible to use that filed?
Yes you can use the Web Services to do lot of things just like filtering a list result. I don't know which language you use, but with JavaScript you can look at these two frameworks that should help you:
http://aymkdn.github.io/SharepointPlus/ : easy way to create your queries (I created it)
http://spservices.codeplex.com/ : the most popular framework but less easy to use (it's my point of view)
You can also look at the documentation on MSDN (the param to use is query): http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
At last found the answer,
The last update date and time can be retrieved from the list column "Modified".
The soap response will have the value in the attribute "ows_Modified".
Muhammad Usman
Let's say I have an object, Widget, comprised of an Id and a Name. Let's say I expose an endpoint, /widget, where clients can POST new Widget objects. If I want the Id field to always be set by the server, not modifiable by the client, but still visible to clients, how can I declare that the Id field is not modifiable? I'm using RESTeasy if that makes any difference.
I can think of a few options.
First, are you sure you need to expose the ID as part of the representation? Or is it enough to respond with the location of the new posted resource?
Your client posts:
<Resource><Name>New Resource</Name></Resource>
And you respond:
HTTP/1.1 201 Created
...
Location: /resources/{new_resource_id}
Beyond that, I think it's OK to have some simple, well-understood conventions with your clients. I think most developers understand that an ID is likely to be system-generated (especially, since you're doing a POST and not a PUT). For less obvious cases, where you have arbitrary read-only fields (or other validation or display information), I think it may make sense to provide a link to metadata:
<NewPersonForm>
<atom:link href="/people/new/metadata" rel="/rels/metadata" />
<Name />
<Department>HR</Department>
</NewPersonForm>
What the metadata looks like is up to you, but something along these lines might work for you:
<Metadata>
<Element>
<Name>Department</Name>
<IsReadOnly>True</IsReadOnly>
</Element>
</Metadata>
That's a nice, format-neutral (it works well for both XML and JSON) way to provide information to the client, and if they really want to, they can program against it to build forms on the fly (I use it to provide validation information, language-specific labels, and data type information).
I hope this helps.
John
You write the code on the server that free to do whatever it wants. And that includes adding or changing data as needed. Check the AtomPub protocol section 9.2 that explicitly states:
Since the server is free to alter the
POSTed Entry, for example, by changing
the content of the atom:id element,
returning the Entry can be useful to
the client, enabling it to correlate
the client and server views of the new
Entry.