Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Alfresco Share 4.1
Custom Metadata
and Actions

Mike Farman
Objectives


•  Extend Share without deep knowledge of
   how Share is built
•  Avoid copy-paste of existing code
•  Simpl...
Customizing the Document Library


•  Metadata
•  Actions

… with configuration - no code
Custom Metadata Display


•  Control the metadata that is displayed in
 the Document List
  o    e.g. Title, Status, EXIF ...
Out-of-the-box Configuration
•  webapps/share/WEB-INF/classes/alfresco/
   share-documentlibrary-config.xml
     •  Templa...
Extend/Override

•  shared/classes/alfresco/web-extension
   share-config-custom.xml
   o  Override existing
   o  Add new...
Example Metadata Template

•  Config: shared/classes/alfresco/web-extension/
     share-config-custom.xml
•    Template ID...
Document Library Actions


•  Simplified & consolidated config for actions
   available on the DocLib, DocDetails and
   F...
Out-of-the-Box Actions & ActionGroups


•  Like metadata, OOTB Actions defined in:
  o    share/WEB-INF/classes/alfresco/s...
Example: Removing Existing Actions


•  share-config-custom.xml                    Config applies to DocLibActions


     ...
Adding New Actions

•  Configuration only, no coding required
•  2 types of action: Simple and Advanced
•  Simple Action: ...
Example New Action: Import ACP/ZIP

•  share-config-custom.xml   Action Definition




                               Form...
Controlling when actions are available


•  Evaluators
  o    Control display of actions based on context e.g.
        •  ...
Action Types


•  Three main action types:
  o    “link” – external link or link to content
  o    “pagelink” – to another...
Example: Mimetype Evaluator


•  Only show Import for ACP/ZIP files
  o    share-config-custom.xml




  o    custom-sling...
Further Reading


•  Mike Hatfield's blog: Share Document
 Library Extensions in v4.0:
  http://blogs.alfresco.com/wp/deve...
Upcoming SlideShare
Loading in …5
×

of

Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 1 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 2 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 3 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 4 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 5 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 6 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 7 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 8 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 9 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 10 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 11 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 12 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 13 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 14 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 15 Alfresco tech talk live share extensibility metadata and actions for 4.1 Slide 16
Upcoming SlideShare
Mapping Human-Centric Product Vision (ProductCamp Boston 2016)
Next
Download to read offline and view in fullscreen.

3 Likes

Share

Download to read offline

Alfresco tech talk live share extensibility metadata and actions for 4.1

Download to read offline

Slide deck to accompany episode 63 of Alfresco Tech Talk Live on share extensibility in Alfresco 4.1

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Alfresco tech talk live share extensibility metadata and actions for 4.1

  1. 1. Alfresco Share 4.1 Custom Metadata and Actions Mike Farman
  2. 2. Objectives •  Extend Share without deep knowledge of how Share is built •  Avoid copy-paste of existing code •  Simplify ungraded – avoid diff/merge •  Easier Deployment
  3. 3. Customizing the Document Library •  Metadata •  Actions … with configuration - no code
  4. 4. Custom Metadata Display •  Control the metadata that is displayed in the Document List o  e.g. Title, Status, EXIF Props etc •  Supports OOTB and custom model properties •  Config driven, no coding required o  Optional Label o  Property only displayed if present on node o  Can use client-side JS for advanced rendering
  5. 5. Out-of-the-box Configuration •  webapps/share/WEB-INF/classes/alfresco/ share-documentlibrary-config.xml •  Templates •  webapps/share/WEB-INF/classes/alfresco/ slingshot-documentlibrary-context.xml •  Evaluators
  6. 6. Extend/Override •  shared/classes/alfresco/web-extension share-config-custom.xml o  Override existing o  Add new templates •  shared/classes/alfresco/web-extension custom-slingshot-context.xml •  Custom evaluators
  7. 7. Example Metadata Template •  Config: shared/classes/alfresco/web-extension/ share-config-custom.xml •  Template ID: exif •  Add line index 60 – exif_model with label •  Evaluator o  Reusing evaluator.doclib.indicator.exifMetadata from the core
  8. 8. Document Library Actions •  Simplified & consolidated config for actions available on the DocLib, DocDetails and FolderDetails pages •  Single Configuration File for OOTB Actions o  share-documentlibrary-config.xml •  Can be overridden via extensions o  Add New, Remove Existing, Change Order of UI Actions o  share-config-custom.xml •  Actions Groups and Actions o  Similar approach to Explorer
  9. 9. Out-of-the-Box Actions & ActionGroups •  Like metadata, OOTB Actions defined in: o  share/WEB-INF/classes/alfresco/share-documentlibrary-config.xml •  <actions> section defines the individual actions •  <actionGroups> defines where and the order in which they appear o  Note: Action must be in an ActionGroup to appear •  Extend/Override in share-config-custom.xml i.e.: o  shared/classes/alfresco/web-extensions/share-config-custom.xml o  No need to copy full OOTB Action/ActionGroup definitions
  10. 10. Example: Removing Existing Actions •  share-config-custom.xml Config applies to DocLibActions Start Workflow Action ID disableAction Evaluator Upload New Version Action ID After: Before:
  11. 11. Adding New Actions •  Configuration only, no coding required •  2 types of action: Simple and Advanced •  Simple Action: No user input (i.e. dialog) o  e.g. Extract Metadata o  Returns success or failure message •  Advanced Action: User provides parameters for action o  e.g. Transform – Need to select target format and output location o  Uses Forms service define dialogs •  see share-form-config.xml for OOTB definitions o  Can plug in your own actions and forms •  Can be used to execute the OOTB Actions or your own custom actions
  12. 12. Example New Action: Import ACP/ZIP •  share-config-custom.xml Action Definition Form Definition - Select destination for extracted files
  13. 13. Controlling when actions are available •  Evaluators o  Control display of actions based on context e.g. •  Type, Aspect, Property, Site, Mimetype etc •  Can use OOTB evaluators or define your own •  Chain them together, all need to evaluate to true •  See slingshot-documentlibrary-context.xml for OOTB evaluators
  14. 14. Action Types •  Three main action types: o  “link” – external link or link to content o  “pagelink” – to another Share page (e.g. details) o  “javascript” – client-side action •  onActionSimpleRepoAction e.g. Simple Workflow approve/reject •  onActionFormDialog e.g. Transform (to image), Run Action
  15. 15. Example: Mimetype Evaluator •  Only show Import for ACP/ZIP files o  share-config-custom.xml o  custom-slingshot-context.xml
  16. 16. Further Reading •  Mike Hatfield's blog: Share Document Library Extensions in v4.0: http://blogs.alfresco.com/wp/developer/2011/09/26/share-document- library-extensions-in-v4-0/ •  Forms: http://wiki.alfresco.com/wiki/Forms •  Forms Developer Kit: http://wiki.alfresco.com/wiki/Forms_Development_Kit#Form_Console •  Custom Models: http://wiki.alfresco.com/wiki/ Data_Dictionary_Guide#Step_by_Step_Model_Definition
  • DavidCiamberlano

    Sep. 11, 2013
  • aca_it

    Mar. 19, 2013
  • mit009

    Mar. 11, 2013

Slide deck to accompany episode 63 of Alfresco Tech Talk Live on share extensibility in Alfresco 4.1

Views

Total views

4,494

On Slideshare

0

From embeds

0

Number of embeds

6

Actions

Downloads

79

Shares

0

Comments

0

Likes

3

×