Is it possible to require checkout in Alfresco? - alfresco

Is it possible to configure Alfresco to always require that a file be checked out before it can be updated?

Behaviours can do the trick. You definitely want to leverage ContentServicePolicies.OnContentPropertyUpdatePolicy. You might need CheckOutCheckInServicePolicies.OnCheckIn as well.

Related

Alfresco content services - Extentions/AMP/customization - How does it work?

I have recently started learning about Alfresco Content Service.
I have some questions:
My understanding is that the standard way to add customization is to create AMP's.
Why create an amps for each customization instead of adding it directly to the configurations of ACS? Are there some benefits like not having to restart the service or something?
If apply_amps adds all custom amps to the alfresco server (.war files), won't there be a risk of customizations writing over each other?
E.g if two different amps change the same standard button in the share service.
I have found that there are 2 ways to add these customizations as well:
Add dependency to the pom file. (works only for .jar)
Actually compile the .amp and move it to the correct folder and run apply_amps.sh.
From the documentation it seems to my like AMP-files used to be the standard way of adding customization but that there have now been a move away from this in favor of using regular jar files and eventually in 7.1 and forward use JSON instead.
Yet other tutorials I find mentions things like "always use .amp". Which then seems strange if it contradicts the information on the official documentation.
Also I found something about adding amps through the share interface? Or must they always be added when building the server (.war)?
Could someone provide me with a thorough explanation of the best practice for applying customizations to the alfresco content service? Preferably with details regarding a live production setting.
Thanks for helping me make some of this clearer.
I'll try to give you helpful answers:
Making app packages (APMs or JARs) is much better than changing config manually. It's good for versioning, portability (TEST vs PROD or between projects), composition (you can add some addons witch are often very useful)... It is standard and good way how to build a web app.
About conflict of customizations, I'm not sure how it works. Is good practise always use own namespace for every AMP.
If AMPs write to the same file, result is always append (share-config-custom.xml can get be very big).
Problem about JARs and AMPs is simple. Old version of Alfresco supports more AMPs than JARs. Now it does not matter with way you use. Try to look inside these packages they look very similarly.
I never heard about adding AMPs through the share interface. Have you some source? Only thing which is similar is creating content model through Model manager (https://docs.alfresco.com/content-services/latest/tutorial/model/)
I use for PROD combination of AMPs and JARs. I have a lot of legacy code and addons in AMPs and new things in JARs. Alfresco work with them same...

Replicating a Drupal website without overwritting destination database

I'm working on a large Drupal website under two environments -Development and Stage. While I work in Development, my client enters content in Stage.
My work in Development modifies the database. Then, I need to be really careful when taking my work to Stage -otherwise I could affect my client's content.
This is painful and inefficient. Do you know of other options for this particular scenario? Perhaps a database merging tool? Thank you for your advice.
This is an inherent issue with Drupal, the storing of configuration and content in the same database. There are methods to help mitigate the issue, (like the Features module that helps you compartmentalize configuration changes) but they are very dependent on module support.
On our last site we tried using the Features module and the Deployment module but so many of the modules we wanted to use didn't have support for Deployment that we ended up not going that route and just manually duplicate configuration changes by hand.
Depending on what your client is entering you might be able to use some handy mysql to solve the issue, can you tell us a bit more about your scenario?
There are two kinds of data, configuration and user content. For user content, set autoincrement to two and use even and odd for dev / staging. For configuration write update hooks. Easy.
Try looking at these two former thread on the same issue:
Drupal DATABASE deployment strategies?
How to merge Drupal database changes
You could turn it around and keep copying your staging site's information to new instances of your development site's platform. Miguel Jacq has done a nice write up on achieving this set up. After testing things through you can then set up a thoroughly tested production platform at the production address and copy the staging site over.
Miguel's article: http://greenbeedigital.com.au/content/drupal-deployments-workflows-version-control-drushmake-and-aegir
Aegir: http://community.aegirproject.org
#jhuebsch: that sounds like a disturbing experience. Can you add a list of the afflicted modules and were you sure to use UUID & Strongarm?

how to manage a team to make a site using drupal?

we have a team and want to make a site using drupal.
as i see all the changes will be saved in database. so how we can have a version control?
should we use of a cvs that take care of databases?
if yes, how can i make a db cvs server?
thanks.
Yes, use git. As far as the database goes, you're best off using update hooks to capture schema changes in code. If you're using cck you're not going to be able to do that reliably. It's a bummer really.
http://api.drupal.org/api/function/hook_update_N
to port views, content type, contexts you can use http://drupal.org/project/features
Devel http://drupal.org/project/devel have tool to make record macros
But realy there is no universal tool for this.
You should utilize Git for team development work for code.
As far as version controlling a database, you are not going to want to do that. It is a lot of headache.
You can move a lot of the stuff that normally goes in the database into the code instead. If you use the strongarm module along with the features module you can save settings, content types views and much more as code and put it into your VCS.

Lib to build an admin-page from a Database schema?

I'm using ASP.Net and NHibernate to build a website. Now, I need to add some sort of administration functionality, and came to think of an old django tutorial I once ran through. Here the admin page was build for me, and I could customize it as I liked.
I see no reason that I couldn't accomplish the same, somehow, in ASP.Net, when I got my NHibernate schemas, thus reducing all the boilerplate admin-code I need to do. Are there any libs out there, that you think will fill my needs somehow?
Thanks in advance :)
- cwap
CodeSmith is good. It allows you to generate ASP.NET admin pages based on your data classes.
A free alternative is mygeneration

How we can update our website created in ASP.NET?

I know first we want to modify and reupload our site. Can we create any software for updating databases instead of direct modification of the database?
I'm assuming you want a tool that will apply changes from one environment to another? In which case look into Redgate's SQL tools.
Yes, I just released a framework can help you to update your project. It's the first release of my project. You can find it in the following url.
http://mep.codeplex.com

Resources