How to find the use of default tables available in drupal - 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.

Related

Business Central Identifying Object form vs Extension Form

I'm also one of many who has begun development work in Business Central. I'm currently in-charge of migrating C/SIDE to AL. My question is, is there a way to identify whether something is in Object form or Extension form? The documentation I have from a third-party vendor says:
"All of company XYZ's products are available in both Object form and in Extension form. Existing customers who want to migrate from the Object version of a solution to the App version will need to go through a migration...."
First a little clarification:
Object form means that the modifications have been done through C/Side.
Extension form means that the modifications are isolated within their own package with one or more dependencies to other extensions. These are not visible in the C/Side Object Designer.
When modifications are done through C/Side the system generates symbols to simulate the extension interface. This provides the needed features to extend C/Side objects.
The easiest way to determine if a modification is in Object or Extension form is to check which extensions are installed on the system. This is can be done in two ways:
In the Business Central client go the the Extension Mangement page. Here all installed extensions will be listed (apart from a few hidden Microsoft extensions that you need not worry about).
Run the command Get-NAVAppInfo through PowerShell. This will list all installed extensions on the requested tenant.

how to develop a custom connector in SailPoint

I am novices to the field of Identity and Access management.
Till now I know, Sail point has provided the some direct connectors to integrate the known systems like LDAP, HR systems, OIM, Databases..
And sailpoint also provided the support for disconnected applications with the use of Custom connectors.
Here, My question is how to develop a custom connector..?
I do not have jar file provided by sailpoint which contain "AbstractConnector" class.
So that I can write my own class and develop..?
I also so not understand, what to do with that class?(if i have a jar)
How sailpoint will refer to that class..
Do we need to deploy that class to somewhere...
Here I am expecting the complete flow to develop and deploy the custom connector..
If anyone is working please help..
If you unzip your identityiq.war, you'll find a JAR file called WEB-INF/lib/connector-bundle.jar. This is the JAR where you'll find AbstractConnector. Once you've written your connector code, you will need to compile it and bundle it into a JAR file, which you will place into WEB-INF/lib.
Finally, you will need to update the ConnectorRegistry object (under Configuration on the debug screen) to reference the new class, which will make it available as an Application type. If it has custom connection parameters (as most do), you will also need an xhtml page that will be embedded into the Sailpoint UI to prompt the user configuring the Application.
If you have Compass access, they have a whitepaper called Custom Connectors that you will find helpful.
All that said, I encourage you to try to find a way to use an out-of-box connector if possible.
Most of the times it will be better if you use the DelimitedFile connector, you can import a CSV of identity data, and make it work within Sailpoint's workflow. You will be able to map fields, correlate accounts and create multi-valued group memberships rapidly. Of course, this means that Sailpoint will not be connected directly to the application, and you will have to develop a workflow to extract the identities and upload them. But at least, you can integrate without going the Custom Connector way.

Custom Report in 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

Can I run code at Alfresco startup?

I have an Alfresco module that I would like to have do some cleanup when a new version of it is installed.
In the current situation, an older version of the module created a folder node with custom properties at the root of the repository. We've since decided to have multiple such nodes, and none of them at that location. I'd like to put into the next version of the module code that would run at Alfresco startup, check for the existence of the old node, copy its properties into the appropriate new nodes, and delete the old node.
Is such a thing possible? I've looked at the Bootstrap configuration file, but that appears to only allow one to add things to the repository, not modify or delete them.
My suggestion is that you write a patch. That is a class that implements
org.alfresco.repo.admin.patch.AbstractPatch
Then you can do pretty much anything you want on bootstrap (except executing searches against solr since it wont be available).
Add some spring configuration, take a look at the file patch-services-context.xml for inspiration.
Yes you can do that, probably you missed the correct place in the documentation about that:
If you open Import Strategy you'll find a section Per BootstrapView, you should be using something like REPLACE_EXISTING or UPDATE_EXISTING for your ACP packaged content (if you're using ACPs as your bootstrap importing strategy).
Here is a more detailed description of the UUID Bindings values.
Hope that helps.
You can use patches.
When alfresco server starts it applies patches and executes database updates etc.
Definition :
A patch is a piece of Java code that executes once when Alfresco
Content Services starts. Custom patches can be implemented.
Documentation Link

Product depencencies: trigger reinstallation

I'm developing a product for Plone, say foo.core. Besides that core product, there are also several related products. like foo.optional. These releated products may be available in the instance and if they are available they may be installed (in other words: I cannot assume the code is available or, if it is, should be used).
These related products may override settings made by foo.core (e.g. in a Property Sheet). This works fine, but if I reinstall foo.core, the default settings are back. What I'd want is to somehow automatically reinstall foo.optional when foo.core is reinstalled in the QuickInstaller.
The solutions I could come up with are:
When foo.optional is installed, it
registers itself with foo.core. The
latter, foo.core, will handle the
reinstallation of all registered
products when the core package is
reinstalled.
The foo.core package
triggers an event which other
packages, like foo.optional, can
listen for. An event handler will
then trigger the reinstall of
foo.optional.
Make sure that foo.core
doesn't overwrite any settings that
may have been customized later by
other products.
Perhaps there are more alternatives? What would be the 'Plonish' approach?
Edit: I know that using upgrade steps might be better than reinstalling the product. However IMHO the problem remains the same: the Generic Setup profile used for the upgrade step might have a setting that is modified in the Generic Setup profile for the foo.optional package.
So using upgrade steps makes my problem even harder: how should I determine whether the upgrade step of foo.core means foo.optional should be reinstalled/upgraded? (The assumption is still that foo.core in principle does not know about foo.optional.)
The solution to your problem is much easier than what you propose:
We do NOT reinstall products like we did in the past when the product is updated. Reinstalling a product will cause your generic setup profile to be reapplied which is why you get your settings overwritten.
Instead you now provide upgrade steps. For instance if you change your profile version from 2 to 3 then you would have:
<genericsetup:upgradeStep
title="Upgrade foo.core from revision 2 to 3"
description="Adds stuff"
source="2"
destination="3"
handler="foo.core.upgrades.two_to_three.addStuff"
sortkey="1"
profile="foo.core:default"
/>
Inside the upgrade step you can do what you like, even re-run individual import steps.
If your product upgrade does not involve changing the GS profile, do not increment the version in metadata.xml. In that case you obviously don't need an upgrade step either.
I suspect you are making things much harder on yourself by involving Plone's add-on installation story (which is complicated by "old" and "new" technologies living side by side). I would take a step back and think more about the plugin system you are trying to design/implement, and avoid including Plone until you absolutely have to [1].
You also might consider using entry points to implement at least a portion of the plugin system:
http://wiki.pylonshq.com/display/pylonscookbook/Using+Entry+Points+to+Write+Plugins
[1] Assuming Plone is a strict requirement and that you are building a content-management-driven application, else you should probably be using Django or Pyramid
Install/reinstall doesn't make sens in the context of an add-on. The vocabulary has been change to activate/unactivate but it is not again enough to understand the situation.
You have a 'setup' where you apply a configuration profile. Apply again and again a configuration profile doesn't make anything except broke existing configurations.
This is why every body will reply to this question by use upgrade step. We don't trigger profile on reinstall, we upgrade add-ons when the setup profile has some changes.
So if you are in a case where settings added by foo.core are changed by foo.optional you can do the following.
With the new plone.registry you can add a handler to the IRecord related events:
add
edit
remove
Consider the documentation:
http://pypi.python.org/pypi/plone.registry
I have done some code related to this where I want to rebuild css registry when some settings has been changed:
https://github.com/collective/collective.jqueryuithememanager/blob/master/collective/jqueryuithememanager/registry.py

Resources