Create custom metadata Tags for documents to be uploaded in Alfresco - alfresco

I am exploring with alfresco 4.3 & 5.0,
As we know our normal documents have metadata properties like Author,Title,Subject,Category.... & so on.
So if it has some values, alfresco retrieves data values from these & displays in that file properties section like :Name,Title,Author,size,creator......and many more.
So Suppose If I have a some more form fields in my document (like firstName,Tenant,isAuthrorized), then what are the all steps that I need to follow in alfresco so that whenever user will upload any document , under that file properties section, all the properties will get displayed and also If I will select edit properties option, I should be able to edit them.
I have followed this pdf :http://ecmarchitect.com/images/articles/alfresco-content/content-article...
By using which I am able to see new drop-down values under create rule section.
Similar way I want to do it document properties section, so that similar to existing properties like Name, Title,Description,MimeType,Tags... etc , I can also see my new properties like firstName,Tenant - all are text fields.
Please show me the way to achieve these things for Alfresco 5.0 a community . To achieve this do I need to import Alfresco sdk, or can I directly changes in tomcat?
Also one more question, I want to create a custom metadata in alfresco , so that if excel sheet(column)have values ,then all such properties with their values should be displayed under properties section of that file.
Is it possible in alfresco?
If yes can you provide me some way to do it.

You can create custom metadata in alfresco.For that in alfresco you can use alfresco content model.For reference you can study below link of alfresco.
https://wiki.alfresco.com/wiki/Data_Dictionary_Guide
Below are some basic information.
You will need to create 2 files for creating custom metadata.
1. Context file
2. Model file
Both files will be inside alfresco/extension folder.
There is one another approach for dynamic model creation.For that you only need to create one file which you will need to upload inside "/Data Dictionary/Models"

Related

How to see tags in a Powerpoint presentation

I am working for an office-add-in for PowerPoint. I need to assign some unique identifier to my files, so that files can be identified in any dot net application. I did similar work for Word using custom properties. But for PowerPoint there is no way to read/ write custom property using office.js.
The only way I found using tags:
https://learn.microsoft.com/en-us/office/dev/add-ins/powerpoint/tagging-presentations-slides-shapes
but when I add tags to the presentation, I am not able to see those tags in presentation directly, I am able to read/ write through code only. Also I am not getting a way to read these tags from dot net application.
Any help will be great.
I am storing my files to azure blob. And reading files in my dot net core application to identify whether it has been saved from an office-add in or not. I am using syncfusion library in dot net core application to work with files.
Try this:
Open a PPT file and add a few tags "wwwww", "yyyyy", "zzzzz".
Close and save the file.
Add ".zip" onto the end of the filename.
Use any unzipper program to unzip the file.
Search the folder of unzipped files for "wwwww", "yyyyy", "zzzzz".
This should tell you where/how tags are stored in the OOXML.
Your .NET app should be able to use the OOXML SDK to read the tags of a PPT file.
At present, Syncfusion Presentation library do not have support to read and edit the tags of PowerPoint elements. Please track the status of this feature from below link,
https://www.syncfusion.com/feedback/1800/create-and-edit-tags-for-powerpoint-elements
However, kindly try the below suggested workaround solutions to achieve your requirement,
Using Shape.Name property:
Add a shape with unique name while generating a document from Office-Addin. You can use Shape.Name property for this.
In .NET Core application, identify the corresponding shape by using Shape.ShapeName property of Syncfusion Presentation library and decide whether its generated by Office-Addin or not. You can refer below UG documentation for more details,
https://help.syncfusion.com/file-formats/presentation/working-with-shapes#specifying-shape-properties
Using custom meta-data on Presentation:
PowerPoint Javascript API documentation states that, when we apply the tags for Presentation object it’s maintained as a custom property of PowerPoint document.
Screenshot
If so, you can able to iterate the custom property of PowerPoint document using Presentation.CustomDocumentProperties API of Syncfusion Presentation library. You can refer below UG documentation for more details,
https://help.syncfusion.com/file-formats/presentation/working-with-powerpoint-presentation#adding-custom-document-properties
Note: This update is from Syncfusion team

Plone setuphandler- In a setuphandler, how can I programatically add/create a folderish content type at root of Plonesite?

I have have made a folderish content type called supplier_folder, which displays a list of suppliers that can be added under it, and their information. I can add it through the navigation bar, but I would like to add it programatically during setup.
I have been following the tutorial on custom installer code (http://docs.plone.org/develop/addons/components/genericsetup.html#custom-installer-code-setuphandlers-py) and have looked at creating objects programatically (http://docs.plone.org/develop/plone/content/creating.html).
Unfortunately, the second article says I need to have a folder created. How can I get around this and add the supplier_folder object at the Plone Site outside of a folder?
IIRC, only users with role Manager or Site Administrator can add content to the root of the site; you can overcome this limitation in two ways:
by using the _constructInstance method as it bypasses the permissions when creating an item
by switching roles inside your code with plone.api.env.adopt_roles
I personally prefer the second one.
you can see an example of a pretty complex setuphandlers.py in interlegis.portalmodelo.policy package.
When you create a new Plone site, it's also creating some default content types.
Look at how Plone do: https://github.com/plone/Products.CMFPlone/blob/1471828ee97a8dd84396bad4a3286be514819869/Products/CMFPlone/setuphandlers.py#L119
There are a couple of ways to achieve this. The buildin mechanism is to use GenericSetup in combination with "structure" folder as described here: http://koansys.com/tech/create-plone-initial-content-with-generic-setup
In short you need the following:
Create a folder "structure" in your Generic Setup profile (in general, under profiles/default)
Create a .objects file with the following content: "suppliers,supplier_folder"
in "structure" create a folder "suppliers" with a .properties file and content:
[DEFAULT]
title = Suppliers
description = Some usefull description text
As far as I remember this is ok for simple structures likes your. If you have complex structures with folders and sub-folders and want more specific control you probably need to write python code. I made some stuff here: https://github.com/collective/zettwerk.setup/blob/master/zettwerk/setup/structure.py
But zettwerk.setup is not yet released, but you should be able to integrate the structure.py right into your project. Than you can the handle_structure method into your setuphandlers.py and passing a structure dict like this:
handle_structure(portal, [{'id': 'suppliers', 'portal_type': 'supplier_folder'}])
The advantage of this method is, that you can also control metadata like workflow state, default page setting, portlets, local roles and some others.

Update GUI from Config File in Qt

I am making a GUI in which based on user login a certain number of buttons are supposed to be enabled and the rest disabled. I have to do this with the help of a config file.
Can anyone please share any examples or references if they know.
Thank you :)
You can write a Qt application that parses an xml file by validating it against a predefined xsd file.
The xml file had layout, grid, button text, and other various information for the user.
The goal of this was the end user could create his/her own xml file to custom configure their buttons.
What you need:
Define a data structure that will match your objective
Validate and test XML
Create a widget with whatever kind of layout you want. If you're doing buttons, you probably want to use a QGrid
Load the XML and configure your layout.

Displaying custom metadata in Alfresco

I was able to add custom aspects to documents in order to set custom properties.
The next step for me would be to have a local instance of Alfresco displaying the custom properties and having them editable so that users can change their values via the web pages.
There's a good link on wiki.alfresco that describes just that and I followed the instructions, but it's not working for me.
In short, I added a custom aspect called my:customAspect like this:
AlfrescoDocument alfDoc = ... // get existing document
alfDoc.addAspect("P:my:customAspect");
// set additional properties
Map<String, Object> propertiesEnum = new HashMap<String, Object>();
properties.put("my:score", 152);
...
alfDoc.updateProperties(updateProperties);
The properties were correctly added and I can see their values either programatically or by using Apache Chemistry Workbench desktop client.
In order to have the additional properties visible in Alfresco Web client, I updated the web-client-config-custom.xml file by setting:
<config evaluator="aspect-name" condition="my:customAspect">
<property-sheet>
<show-property name="my:score"/>
</property-sheet>
</config>
Unfortunately, I can't see this property listed in the Alfresco web (including the /share one) for the documents on whom I added the custom aspect.
Maybe I'm missing something, maybe there are some other xml files that should be updated.
Any help appreciated.
Thanks
Unfortunately, viewing custom aspect properties is not supported in Share.
If you need to show these props you have to include them in the form defined for a particular type.
You could use this little help.

Drupal6: View that shows a directory structure

I've built a content type to handle document upload. My content type uses a Book node to handle directories/subdirectories and I would like to show a couple of Views that shows the directories structure. When clicking on a directory I would like to show, in another view, all the documents inserted in that directory.
Do you know any existing examples of Views/Panels? That shows a similar structure, as in the Windows Explorer, using Views2?
You can use this module: views_tree
Also tree-like can be built via argument handlers...

Resources