Custom Report in alfresco? - alfresco

Currently i am generating a report (we are getting files are uploaded within a time stamp).
I am getting all files and folders.Iterating the result and checking created date one by one.That is taking too much time approx 8 min to revert with resuls.Can anyone tell me is there any alfresco report api that i can use? or using solr how to fetch the result?

I like to follow an approach which is maybe not really orthodox. Usually, you don't want to report on all documents, only document using a specific type or aspect. So, what I do is to create a Java behaviour on onCreate, onUpdate and onDelete that updates a custom database with only the metadata that I'm interested in. Then, I can connect any OOTB reporting tools such as Pentaho, Jasper or Tableau. You have of couse some other traditional alternatives, such as:
Using this module developed by a community member: http://fcorti.com/alfresco-audit-analysis-reporting/
Or using the module provided by Alfresco: http://docs.alfresco.com/analytics/concepts/analytics-using.html

SOLR/Lucene is not an option, querying DB directly is not an option either (performance wise).
I would suggest using one of the options available (AAAR for instance) or developing something on your own following the same principles.

I did little bit investigation on this and found below link.
http://docs.alfresco.com/4.0/tasks/audit-recording-values.html
I think you can user auditService in alfresco and get your things done.There are few alfresco webservices(related to audit) already available which will allow you to filter response.In case if you need to customize it , than you can create webscript and use auditService in it.
You can use below url for browsing all your alfresco webservice.
http://localhost:8080/alfresco/service/index

Related

how to create a new folder using alfresco api

I have uploaded sample.zip file in this directory CompanyHome/site/testsite/documentlibrary/test.
Now I want to create new folder called childfolder under above directory [CompanyHome/site/testsite/documentlibrary/test/childfolder] and move the sample.zip under it.using Alfresco API how do i create child folder and move the file under newly created childfolder?
This really depends upon what version of Alfresco you're using and what API you want to use to do it. For example, assuming that you want to do this via a REST API then you have the option of CMIS, the recent "Public API" or the internal WebScript based API.
Alternatively, you might want to do this by using the JavaScript API and WebScript develop your own WebScripts.
There are lots of ways to achieve this - perhaps you can provide some more information on the overall picture of what you're trying to do and where you're trying to do this (e.g. as an extension of Share maybe?).
It's possible to create a folder within Share and if you do so whilst you have browser developer tools open you'll be able to see the exact REST API calls that are used.

Reference docs for Azure Resource Templates

I am looking for reference docs for the Azure Resource Manager JSON templates. Does anyone know if there is reference material for these templates?
There is general reference for required parameters etc like at Create a template deployment.
I am basically looking for the full availability so I can correspond setup on the portal to the JSON template. Also availability of features with apiVersion releases. I remember there being a MSDN documentation for the changelog with api version releases but cannot find it now.
If you create a VM with the desired settings, extensions etc then you can view their json template via https://resources.azure.com/
This will give some visibility into the Classic* templates.
All of the ARM templates can be found on GitHub here: https://github.com/Azure/azure-resource-manager-schemas.
It includes preview templates and should provide all the information you're after to determine which features are present in which apiVersion release.
Microsoft has finally created what I was looking for 🎉: full documentation is now available at https://learn.microsoft.com/en-au/azure/templates/
After some digging I managed to get the following list of schemas:
http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json
http://schema.management.azure.com/schemas/2014-06-01/Microsoft.Web.json
http://schema.management.azure.com/schemas/2014-04-01-preview/Microsoft.Sql.json
http://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json
http://schema.management.azure.com/schemas/2014-02-26/microsoft.visualstudio.json
http://schema.management.azure.com/schemas/2014-04-01-preview/Microsoft.Cache.json
http://schema.management.azure.com/schemas/2014-04-01/Microsoft.BizTalkServices.json
http://schema.management.azure.com/schemas/2014-08-01/Microsoft.Scheduler.json
http://schema.management.azure.com/schemas/2014-04-01/SuccessBricks.ClearDB.json
http://schema.management.azure.com/schemas/2015-01-01/Microsoft.Resources.json
http://schema.management.azure.com/schemas/2015-01-01/Microsoft.Authorization.json
http://schema.management.azure.com/schemas/2014-10-01-preview/Microsoft.Authorization.json
This list notably excludes:
Microsoft.ClassicCompute
Microsoft.ClassicStorage
Microsoft.ClassicNetwork
So I guess we're left to figure stuff out from the templates on those
To my mind we can dig that way:
open the azure-resource-manager schemas
Look at the main form below:
If you open properties, you will find the format that we need to fill:
open parameters and look at the structure:
$ref: #/definitions/parameter invite us to look at the same documents in definitions.parameters where you will find some documentation (like value you can use etc):
finally, if you look to properties.resources, you will find a list of url like:
{ "$ref": "http://schema.management.azure.com/schemas/2015-07-01-preview/Microsoft.ServerManagement.json#/resourceDefinitions/node" }
{ "$ref": "http://schema.management.azure.com/schemas/2015-07-01-preview/Microsoft.ServerManagement.json#/resourceDefinitions/gateway" }
if you open one of these url, you will find the JSON format you are looking for (here is a part of the first one):
There is not much available...
Azure Resource Manager Template Language
https://azure.microsoft.com/en-us/documentation/articles/resource-group-authoring-templates/
And then you can look at the different json.schemas that I have managed to find
deploymentTemplate
http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json
visualstudio
http://schema.management.azure.com/schemas/2014-02-26/microsoft.visualstudio.json
Sql
http://schema.management.azure.com/schemas/2014-06-01/2014-04-01-preview/Microsoft.Sql.json
Web
http://schema.management.azure.com/schemas/2014-06-01/Microsoft.Web.json
deploymentParameters
http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json
If you use Visual Studio to edit the json-template file you get intellisense (sometimes) which help a bit. But the lack of documentation is really annoying...for example I have no clue if the schemas listed above are the most recent or not, and I have no idea where to find which one is the most resent.
Edit:
I came across the list of additions and changes to the Service Management APIs. Seems to be a bit outdated, 2015-01-01 is the current version and it's not there.
Edit2:
With the Iaas updates at Build 2015, there seems to also be a lot of Azure Quickstart Templates. At minimum, they have the particular cases I was looking for with storage accounts.

programmatically execute alfresco rules

I have created a rule programmatically in Java and attached with a space, its working fine whenever a new document is inserted into that space. But what if I already have some documents uploaded in the space and I want to run the Rule. I know i can do this via Explorer as defined in the following article.
http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Ftasks%2Flibrary-folder-rules-run.html
But I want to achieve the same using Java code.
Does any one please suggest some solution.
:: I am using Alfresco enterprise 4.0.2
I would recommend you to bind behaviours to policies instead if you are into java:
http://wiki.alfresco.com/wiki/Policy_Component#Binding_Behaviour_to_a_Policy
My personal experience is that you as a developer get much more control over events in the repository using behaviours (opposed to rules). But maybe thats just me :)

How to find the use of default tables available in drupal

How can I able to find the usage of default tables available in drupal.
Is there any documentation available?
For example: there is a table called node. I need to know what is the usage of it and how it acts.
Any suggestions or answers will be helpful and grateful.
Your question is not very clear (the term "usage" is quite ambiguous), but you could install the Devel module. After setting it up it will show, for every page loaded (home page included), which SQL queries are run.
Every module can add tables to the database. A default Drupal install uses core modules, either required ones or those installed as dependencies of the default installation profile. These modules install their own tables.
Each module declares its tables in its implementation of hook_schema. The Schema module use the information from the implementations of this hook to provide a schema documentation.
Most of the time, you shouldn't directly access the database but use the API provided by the modules managing the data. Tables are usually considered private for their modules. New release of a module may change its schema in an incompatible way. Using API is much safer. Unfortunately, sometimes database access is the only option. In these cases, implementation of a data access layer between your code and the database is advised.

SAP NetWeaver 7 trial and .NET connector 3.0 - available functions?

I am using the .NET Connector 3.0 to connect to some NetWeaver instance running on another machine. It all works nice, but the tutorial only connects to one function called STFC_CONNECTION. To do this, I am using this code:
function = destination.Repository.CreateFunction("STFC_CONNECTION");
Problem is, how do I know what other functions I can call? I there an overview of the available functions and return values? I have a login for the SAP site, so thats not a problem.
Thanks :)
If you want to know all function that can be called, you can check the table TFDIR with parameter FMODE ='R' (for Remote) using transaction se16. However, this will clearly be far too much info, since there is no explanation of what the functions do, or how they relat to each others.
another possibility is to use the BAPI transaction to get info on disponible operation by functionnal area.
Last, if you know some functions that interest you, you can search for function with the same prefix, or inportant part (ie INFTY for HR for exemple) using transaction se37. Please note that in this case, returned function can be inaccessible by RFC : you will have to check in the function's properties if the execution type is 'Remote'.
Regards
Guillaume
You'll need access to the SAP system using the SAP GUI, otherwise you won't be able to read the documentation. Use the transaction SE80 / Repository Explorer to search for function modules. Clicking on the + button will extend the selection screen. In the additional selection options, make sure to select only RFC-enabled function modules.
EDIT: Also check out this question...
I figured it out ... just type SE37 as transaction and use a filter in the search box like STFC_* and it will find all the functions including the parameters and return values.
The description at Consuming SAP XI Web Service with Microsoft Visual C# 2008 Express Edition provides a sample worked example for Visual Studio 2008.
SAP support either the RFC stack (SOAP, WSDL, UDDI) or the direct .NET Connector.
There is also the bapi explorer transaction "BAPI" who will show you the BAPI functions divided into functional areas.

Resources