Alfresco’s highly customizable repository can often seem overwhelming. Learn approaches for adding common customizations requests (Extending Javascript API, Content Modeling, Permission Modeling, packaging, etc.) from current and former Alfresco consulting staff. Learn where we often see the most common errors and participate in open Q&A.
Grails is revolutionizing web development in many corporate Java environments. However, leveraging managed content isn’t straight forward with the myriad of incompatible ECM systems prevalent in businesses. The Content Management Interoperability Services (CMIS) standard allows for products or applications to be built independently of the underlying content repository. CMIS and Grails is a powerful combination for handling document management activities and displaying web content assets within custom web applications. This session will explore: How to integrate a CMIS repository with Grails applications, Apache Chemistry OpenCMIS vs. roll your own, Authentication models, Practical considerations, Alfresco extensions to CMIS and OpenCMIS. The concepts will be presented before diving into a hands-on session with Grails.
Introducing Assetic: Asset Management for PHP 5.3Kris Wallsmith
The performance of your application depends heavily on the number and size of assets on each page. Even your blazingly fastest Symfony2 application can be bogged down by bloated Javascript and CSS files. This session will give you a basic introduction to PHP's new asset management framework, Assetic, and explore how it integrates with Symfony2 for a pleasant, common sense developer experience.
Grails is revolutionizing web development in many corporate Java environments. However, leveraging managed content isn’t straight forward with the myriad of incompatible ECM systems prevalent in businesses. The Content Management Interoperability Services (CMIS) standard allows for products or applications to be built independently of the underlying content repository. CMIS and Grails is a powerful combination for handling document management activities and displaying web content assets within custom web applications. This session will explore: How to integrate a CMIS repository with Grails applications, Apache Chemistry OpenCMIS vs. roll your own, Authentication models, Practical considerations, Alfresco extensions to CMIS and OpenCMIS. The concepts will be presented before diving into a hands-on session with Grails.
Introducing Assetic: Asset Management for PHP 5.3Kris Wallsmith
The performance of your application depends heavily on the number and size of assets on each page. Even your blazingly fastest Symfony2 application can be bogged down by bloated Javascript and CSS files. This session will give you a basic introduction to PHP's new asset management framework, Assetic, and explore how it integrates with Symfony2 for a pleasant, common sense developer experience.
Imagine for a while that Rails wouldn't exist. How would we write a MVC app from scratch?
Rack provides a minimal interface for developing web applications in Ruby. In fact it's the solid foundation of all major Ruby powered web frameworks.
During this talk we will dive deep into Rack. We will see the smallest possible Rack Application and learn how it works, by studying Rack internals. We will grow the Application step by step till we implement it in simple MVC style.
CouchDB for Web Applications - Erlang Factory London 2009Jason Davies
CouchDB is built "of the Web" and it's very exciting to convert the immense
power that CouchDB provides into a usable, real-world Web application. In this
talk I cover case studies of real-world applications that use CouchDB,
including some that can be served from CouchDB itself, and how CouchDB can
shape your Web applications to be highly scalable and flexible by embracing
HTTP philosophies, JavaScript and schemaless documents.
Slide links:
- https://lumberjack.rareloop.com
- https://docs.lumberjack.rareloop.com
- https://github.com/Rareloop/lumberjack-bedrock-installer
- https://github.com/Rareloop/lumberjack
- https://github.com/Rareloop/lumberjack-validation
- https://github.com/Rareloop/hatchet
- https://lizkeogh.com/2017/08/31/reflecting-reality/amp
- https://www.upstatement.com/timber
- https://roots.io/bedrock
- https://scotch.io/bar-talk/s-o-l-i-d-the-first-five-principles-of-object-oriented-design
- https://github.com/zendframework/zend-diactoros
- https://www.php-fig.org
- http://php-di.org
---
Often WordPress themes are not easy to change, maintain or fun to work on. This can rule WordPress out as a viable option for bespoke, non-trivial websites.
In this talk we’ll dive into how this happens & look at how we can benefit from software engineering techniques to help make your code easier to change. I’ll also show how using Lumberjack, a powerful MVC framework built on Timber, can be used to power-up your themes.
Presentation on how Meetup tackles web performance. Given on:
- Nov 17th, 2009 for the NY Web Performance Group (http://www.meetup.com/Web-Performance-NY/)
- Jan 26th, 2010 for NYC Tech Talks Meetup Group (http://www.meetup.com/NYC-Tech-Talks/)
RSVP Node.js class at www.nycdatascience.com
NYC data science academy's free workshop, given at NYC Open Data Meetup, http://www.meetup.com/NYC-Open-Data/events/163300552/
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsRyan Weaver
Bower, Grunt, and RequireJS are just a few tools that have been re-shaping the frontend development world, replacing cluttered script tags and server-side build solutions with a sophisticated, but sometimes complex approach to dependency management and module loading. In this talk, we'll put on our trendy frontend developer hat and find out how these tools work and how they differ from what we might be used to. Most important, we'll see how using tools like this might look in Symfony2 and how our application can be a friendly place for a frontend guy/gal.
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...J V
Alfresco Summit 2014 (London)
Though best practice is to leverage Alfresco through the well defined API's, it can be useful to understand the internals of the repository so that your development efforts are the most effective. A deep understanding of the repository will help you to evaluate performance bottlenecks, look for bugs, or make contributions. This session provides an overview of the repository internals, including the major components, the key services, subsystems, and database. We then provide an example where we leverage the repository in a micro-service architecture while building Alfresco's future cloud products and show how the different parts of the repository interact to fulfill requests.
http://summit.alfresco.com/london/sessions/diving-deep-alfresco-repository
https://www.youtube.com/watch?v=TAE9UjC0xxc
Imagine for a while that Rails wouldn't exist. How would we write a MVC app from scratch?
Rack provides a minimal interface for developing web applications in Ruby. In fact it's the solid foundation of all major Ruby powered web frameworks.
During this talk we will dive deep into Rack. We will see the smallest possible Rack Application and learn how it works, by studying Rack internals. We will grow the Application step by step till we implement it in simple MVC style.
CouchDB for Web Applications - Erlang Factory London 2009Jason Davies
CouchDB is built "of the Web" and it's very exciting to convert the immense
power that CouchDB provides into a usable, real-world Web application. In this
talk I cover case studies of real-world applications that use CouchDB,
including some that can be served from CouchDB itself, and how CouchDB can
shape your Web applications to be highly scalable and flexible by embracing
HTTP philosophies, JavaScript and schemaless documents.
Slide links:
- https://lumberjack.rareloop.com
- https://docs.lumberjack.rareloop.com
- https://github.com/Rareloop/lumberjack-bedrock-installer
- https://github.com/Rareloop/lumberjack
- https://github.com/Rareloop/lumberjack-validation
- https://github.com/Rareloop/hatchet
- https://lizkeogh.com/2017/08/31/reflecting-reality/amp
- https://www.upstatement.com/timber
- https://roots.io/bedrock
- https://scotch.io/bar-talk/s-o-l-i-d-the-first-five-principles-of-object-oriented-design
- https://github.com/zendframework/zend-diactoros
- https://www.php-fig.org
- http://php-di.org
---
Often WordPress themes are not easy to change, maintain or fun to work on. This can rule WordPress out as a viable option for bespoke, non-trivial websites.
In this talk we’ll dive into how this happens & look at how we can benefit from software engineering techniques to help make your code easier to change. I’ll also show how using Lumberjack, a powerful MVC framework built on Timber, can be used to power-up your themes.
Presentation on how Meetup tackles web performance. Given on:
- Nov 17th, 2009 for the NY Web Performance Group (http://www.meetup.com/Web-Performance-NY/)
- Jan 26th, 2010 for NYC Tech Talks Meetup Group (http://www.meetup.com/NYC-Tech-Talks/)
RSVP Node.js class at www.nycdatascience.com
NYC data science academy's free workshop, given at NYC Open Data Meetup, http://www.meetup.com/NYC-Open-Data/events/163300552/
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsRyan Weaver
Bower, Grunt, and RequireJS are just a few tools that have been re-shaping the frontend development world, replacing cluttered script tags and server-side build solutions with a sophisticated, but sometimes complex approach to dependency management and module loading. In this talk, we'll put on our trendy frontend developer hat and find out how these tools work and how they differ from what we might be used to. Most important, we'll see how using tools like this might look in Symfony2 and how our application can be a friendly place for a frontend guy/gal.
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...J V
Alfresco Summit 2014 (London)
Though best practice is to leverage Alfresco through the well defined API's, it can be useful to understand the internals of the repository so that your development efforts are the most effective. A deep understanding of the repository will help you to evaluate performance bottlenecks, look for bugs, or make contributions. This session provides an overview of the repository internals, including the major components, the key services, subsystems, and database. We then provide an example where we leverage the repository in a micro-service architecture while building Alfresco's future cloud products and show how the different parts of the repository interact to fulfill requests.
http://summit.alfresco.com/london/sessions/diving-deep-alfresco-repository
https://www.youtube.com/watch?v=TAE9UjC0xxc
Once you're done coding, the project is all but finished. There are lots of tools to keep control over your code outside your IDE. Especially continuous integration tools are really helpfull for this purpose. Under the hood of a CI, or at commandline, Phing can be used for lots of PHP specific tasks that are usually executed within a CI. Phing is a sort of PHP version of the Apache Ant tool, which is neatly integrated with some handy PEAR packages. During this presentation you'll get a basic understanding about Phing and its features. We will walk through some examples and screens, so you get some basic knowledge about phing and in what type of fields it can be really usefull.
Since late 2009 there is Spring 3 published. Some things are new, something keep and something was removed.
Thos talk discuss the changes of the 3rd edition of Spring and introduce Spring Roo, Grails and the SpringSource Toolsuite.
"I have a framework idea" - Repeat less, share more.Fabio Milano
macOS, tvOS, iOS, watchOS, Extensions. In such a dense ecosystem, creating a framework enables us to easily share code between components of our universal applications and with the open-source community.
In this talk, we will learn about processes and tools that help create, 'ship' and maintain a multi platform framework. Throughout all steps, we will see how to use CocoaPods and Carthage, integrate CI tools to keep our code robust, see best practices for authoring frameworks. We'll show how frameworks could change our way of designing an application infrastructure and how you can contribute to the open-source community by turning your idea into a framework.
Introduction to Infrastructure as Code & Automation / Introduction to ChefNathen Harvey
Your customers expect you to continuously deliver delightful experiences. This means that you’ll need to continuously deliver application and infrastructure updates. Hand-crafted servers lovingly built and maintained by a system administrator are a thing of the past. Golden images are fine for initial provisioning but will quickly fail as your configuration requirements change over time.
It’s time for you to fully automate the provisioning and management of your infrastructure components. Welcome to the world of infrastructure as code! In this new world, you’ll be able to programmatically provision and configure the components of your infrastructure.
Disposable infrastructure whose provisioning, configuration, and on-going maintenance is fully automated allow you to change the way you build and deliver applications. Move your applications and infrastructure towards continuous delivery.
In this talk, we’ll explore the ideas behind “infrastructure as code” and, specifically, look at how Chef allows you to fully automate your infrastructure. If you’re brave enough, we’ll even let you get your hands on some Chef and experience the delight of using Chef to build and deploy some infrastructure components.
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
OSGi Community Event 2018 Presentation by David Bosschaert (Adobe)
Abstract: OSGi lends itself well to develop extensible applications assembled from reusable modules, where a set of bundles together with a set of configurations deployed to a provisioned OSGi framework is the application.
While this works very well for the originally intended use-cases, maintaining and building large applications developed by multiple teams often requires to assemble multiple larger components for which there is limited support in OSGi as of today. This is especially true in cases where multiple groups of bundles, configuration, metadata, and other artifacts need to be combined.
In this talk we will introduce you to OSGi RFP-188, named OSGi Features, which defines the requirements on providing a solution. We'll establish a shared understanding of the problem space and how it relates to already available mechanisms in OSGi (like e.g. subsystems, deploymentadmin, startlevels, etc.) and will subsequently, review it in the context of some of the current (open source) solutions like Apache Karaf Features and Apache Sling Features and Bnd.
Introduction to InSpec and 1.0 release updateAlex Pop
Contains an introduction to infrastructure and compliance tests as code and how InSpec can be used for this.
Agenda:
* Why infrastructure tests as code
* What is InSpec and how it works
* Core and custom resources
* What's new in InSpec 1.0 (released Sept 26, 2016)
* Documentation and installation
* Integrations
* Demo
* Chef Community Summit
»Spring 3« ist da. Vieles ist geblieben, manches verschwunden, manches neu. Spring 3 verspricht eine verbesserte und dynamischere Konfiguration, einen leistungsfähigen und mächtigen REST-Support und viele kleine Verbesserungen. Parallel zu dem Spring 3-Release wurden auch andere Tools und Projekte aktualisiert, auf die wir ebenfalls einen Blick werfen wollen:
* Wichtige Änderungen
* Java Configuration
* Spring Expression Language
* Spring MVC und Rest
* Embedded Database
* SpringSource Toolsuite
* Spring Roo
* Grails
ITT 2015 - Simon Stewart - Building Android Apps at Speed and ScaleIstanbul Tech Talks
Every two weeks Facebook releases a new version of their flagship Android application which is one of the most widely used apps in the world. The codebase is worked on by a large engineering team. In this talk, Simon Stewart covers some of the technologies and approaches that Facebook use to allow their engineers to work with confidence and speed on the codebase, while at the same time ensuring solid and timely releases.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
2. Pre - Install!
Environment Validation Tool or EVT
• Available on Google Code !
• (http://code.google.com/p/alfresco-environment-validation/)!
• Currently targets version 3.3 (though mostly still
applicable)!
• Maintained by Support!
Zero Day Config Guide or ZDC
• Enterprise Only!
• Available in the KB section of support site!
3. Donʼt Query if Donʼt Have to Query!
Know you nodes
JavaScript!
!search.findNode()!
Java!
!new NodeRef()!
4. There is a cost!
Web Scripts in the Repo? For Shame!
• Extra IO!
• To both the DB and the File System!
• Lightly used vs High usage!
6. Do you really need a type?
Important questions to ask!
• Is it likely to change frequently!
• Is it a fixed state!
7. But I really need to change that type!?!
Adding is OK
Subtraction is Not
If you must remove!
• Hide it from the users in the client!
• Mark Java references deprecated!
• NEVER modify the DB directly!
8. Donʼt Force It!
• Donʼt force your model to fit the UI!
• Sometimes the best approach is a
simple custom UI!
• The repository has capabilities
beyond what Explorer and Share!
9. We Enforce the Law!!
There was a bug the allowed you to work
incorrectly across models. We’ve fixed the
bug. This may result in broken models
when upgrading from earlier versions.
Take care to thoroughly test your models
before upgrading. You may need to not
only fix your model, but massage the data,
!
or fix your custom code.
10. Have you
tried
Turn It Off! turning it
off…
When Possible Turn off unneeded
Services
• File interfaces!
• Indexing (Less important in 4.0)!
• Quota Calculations!
• Subsystems!
11. Youʼre Using Web Services!?!
SOAP just makes me feel dirty
•
• !
*Though creating your own SOAP Client won’t be as easy as just using
Apache Chemistry
12. Bulk File System Import Tool!
Available on Google Code, not BFSIT!?!
official supported by Alfresco.
Maintained by Alfresco
Employees.!
Single purpose import:!
Read content (metadata and
versions supported) from the
Filesystem!
http://code.google.com/p/
alfresco-bulk-filesystem-import/!
20. A few things learned!
Echo --- having a build process that includes deployment
early on, is very useful.
– Building an AMP file is not as much trouble as it may seem.!
– Many folks already have an Ant or Maven build config around that
you can use (do not re-invent the wheel)!
Naming Conventions are important.
– If you plan on having multiple customizations in a single repository,
this will help avoid conflicts!
– Enterprise customers who have a mix of internal development teams
and partners must think about this from Day 1.!
23. Some Ant examples – Start/Stop Alfresco!
<target name="start-alfresco"
description="Start the Alfresco Repository">
<exec executable="/bin/sh">
<arg line='-c "${alfresco.dir}/alfresco.sh start"'/>
</exec>
</target>
<target name="stop-alfresco“
description="Stop the Alfresco Repository">
<exec executable="/bin/sh">
<arg line='-c "${alfresco.dir}/alfresco.sh stop"'/>
</exec>
</target>
24. About The Example!
This example implements a simple customization that allows
documents to be tagged as sendable.
Each document has a status and a document ID
– The document ID does not have to be the object ID and is guaranteed
to be unique in the repository.!
– The valid statuses are staged, effective and retired.!
Users must have ManageSendable Permission to change the
sendable status.
25. Extending Permissions!
Why Extend Permissions
– Allows Developers to Secure new functionality with ACLs!
– Allows Developers to Expose new combinations of low level
permissions a new role.!
Examples of Extended Permissions
– Share!
– Records Management!
Caveats and Gotchas
– If you create new permissions you will have some extra work
around security.!
26. Steps!
Create Permissions Model File
– The Records Management and Share Permissions files are good
examples!
– The DTD is another good source of documentation -- http://
wiki.alfresco.com/wiki/PermissionModelDTD!
Wire in the bean
– Add the permissionModelBootstrap bean!
– Wire in any additional permissions using Security Interceptors (if
needed)!
– Add any needed permissions to the
slingshotDocLibCustomResponse bean!
27. Permission Model Code Snippet!
<permissions>
<!-- Namespaces used in type references -->
….
<permissionSet type="senddoc:content" expose="all">
<permissionGroup name="ManageSendable" expose="true"
allowFullControl="false"/>
<!-- The low level permission to control setting the owner of a node -->
<permission name="_ManageSendable" expose="false" requiresType="false">
<grantedToGroup permissionGroup="ManageSendable" />
<requiredPermission on="node" type="sys:base" name="_ReadProperties" />
</permission>
</permissionSet>
</permissions>
29. Creating JavaScript APIs!
Why Create JavaScript APIs
– Exposes key functionality to JavaScript!
– Allows for the encapsulation of the “heavy lifting” functionality!
Some examples of how Custom Javascript APIs are used
– Called from Javascript Based webscripts!
– Unit testing underlying Java Functionality from JavaScript Scripts that
can be run with the Execute Script Action!
30. Steps!
Create the Java Class that will provide the API
– Extend the
org.alfresco.repo.jscript.BaseScopableProcessorExtension class!
– All public methods that are not setters and getters will be exposed as
JavaScript methods.!
– Make sure that you convert NodeRefs into ScriptNodes and visa
versa.!
– Make sure that arguments passed and returned are Scalars,
Scriptables, Arrays or Maps.!
Wire in the bean
– Extend the baseJavaScriptExtension bean!
– Set the extensionName property!
31. Code Snippet!
public class SendableScriptAPI extends
BaseScopableProcessorExtension {
// Code Omitted
public ScriptNode getNodeRefById(String docId) {
NodeRef result = sendableService.getNodeRefById(docId);
return new
ScriptNode(result, this.serviceRegistry, getScope());
}
public void makeSendable(ScriptNode nodeRef,String docId) {
sendableService.makeSendable(nodeRef.getNodeRef(), docId);
}
}
33. Attribute Service!
What is the Attribute Service
– Allows for the storage of arbitrary key value pairs!
– Each key can have up to 3 segments.!
– The key segments and values are all Serializables (i.e. can be
anything).!
Why Use Atrribute Service
– There are a number of use cases…..!
– Our use case – properties that must have a unique value across
nodes.!
• Allows making associations between values and nodes via the Database!
• Allows for Enforcing Uniqueness of certain Values!
– AttributeService also allowed for retrieving nodes (immediately across
all nodes in a cluster) by a property value. (This is less of an issue in
swift).!
34. Steps For Using the Attribute Server!
Determine how you will plan on using it.
– Think about the Key space – use the fact that the key is segmented.!
– Think about the core operations!
– Wrap it all in a component.!
35. Example Code Snippet…!
public static final String SENDABLE_ATTR_NAME = "..SENDABLE_ID..";
public static final String SENDABLE_DOC_ID_ATTR_NAME = "..DOC_ID..";
public void storeDocId(String doc_id,NodeRef nodeRef) {
if (attributeService.exists(SENDABLE_ATTR_NAME,
SENDABLE_DOC_ID_ATTR_NAME,doc_id)) {
// Check to see if this node has already been registered
if (!attributeService.getAttribute(SENDABLE_ATTR_NAME,
SENDABLE_DOC_ID_ATTR_NAME,doc_id).equals(nodeRef)) {
throw new SendableRuntimeException("Duplicate entry
id:"+doc_id);
}
}
attributeService.setAttribute(nodeRef,SENDABLE_ATTR_NAME,
SENDABLE_DOC_ID_ATTR_NAME,doc_id);
}