Alfresco SDK 3.0 Walkthrough, Part 2

If you missed our first part of this walkthrough series, you’ll want to check that out first, as it will inform this one. In the last post we talked about setting up the base project and discussed the pom files.

Now, we’ll dive a little deeper into the folder structures and other files, and how they’ll be used in the project.

Src

This folder is at the base of the project and only contains the “test” folder.

Test

Inside this folder is where you will find a “license” folder (for placing/testing with licenses), a “properties” folder where you can define your local alfresco-global.properties based on the DB type that’s enabled in the main pom file, and a “resources” folder where you can manage your hotswap-agent.properties for each module, as well as alfresco, share, and tomcat specifics, such as the context-solr.xml file or dev-log4.properties file.

Integration tests

This structure will not include an in depth overview like the next two structures, as the integration tests are meant to test integration, which are usually clients accessing the Alfresco platform to perform tasks.

Src/Test

This is where the test’s properties, resources and java test classes will reside for this module.

Src/Main

This directory holds Java classes that will perform your integration tests.

Platform Folder

Src/Test/Java

This folder will hold your JUnit tests for your platform extensions.

Src/Main

Assembly/Web

At the base of the “Assembly” directory there are an “amp.xml” and a “file-mapping.properties” (shown below) file which both provide information and configuration for if you’re building AMP files instead of JAR files. The “web” directory is for overriding any out of the box resources only. New Web resources have their own location.

Java

Any custom Java you write for your extensions will go in this folder. This is Java for platform/repository side webscripts or other extensions.

Resources/Alfresco

In the previous SDK versions this “alfresco” directory would be under “src/main/amp/config” in the “repo-amp” directory of your project. Not much as changed, except the module.properties file is inside with the module-context.xml file, along with any alfresco-global.properties particular to your extension.

Resources/META-INF

This folder will hold additional web resources for your platform instance, for example, if you’re including servlets inside of your solution, this is where they’d go.

Share Folder

Src/Test/Java

This folder will hold your JUnit tests for your share extensions.

Src/Main

Assembly/Web

At the base of the “Assembly” directory there are an “amp.xml” (shown below) and a “file-mapping.properties” file which both provide information and configuration for if you’re building AMP files instead of JAR files. The “web” directory is for overriding any out of the box resources only. New Web resources have their own location.

Java

Any custom Java you write for your extensions will go in this folder. This is Java for share side webscripts or other extensions.

Resources/Alfresco

In the previous SDK versions this “alfresco” directory would be under “src/main/amp/config” in the “share-amp” directory of your project. It is also important to note that if you’re extending or overriding any out of the box functions, the “resources” directory will be the base directory for the start of those packages (i.e. if a package doesn’t start with “alfresco”, and instead starts with “org”).

Resources/META-INF

This is where your share-config-custom.xml file will go. There’s another directory under META-INF also named “resources” that will hold your module’s web resources, and javascript/CSS extensions.

This concludes part two of our walkthrough.

Thanks for reading, and Happy Building!

Leave a Reply

Your email address will not be published. Required fields are marked *

From our Blog...

Alfresco SDK 3.0 Walkthrough, Part 2

If you missed our first part of this walkthrough series, you’ll want to check that out first, as it will inform this one. In the last post we talked about setting up the base project and discussed the pom files. Now, we’ll dive a little deeper into the folder structures and other files, and how they’ll… Read more »

Read More

It’s here! Alfresco to Dropbox Connector

As mentioned in a previous post we’ve been working on a way to synchronize content from Alfresco to Dropbox. Where do I get it? You can get the project as well as installation instructions right here at our github. What can we expect? Since this is just a beta release, there will still be bugs and issues… Read more »

Read More

Coming soon: Alfresco Connector for Dropbox

Lately here at Fika we’ve been thinking of a fun new Community project for Alfresco that will provide users a way to connect to their content. In that regard, we noticed an Alfresco integration for Dropbox[1] that was mostly finished, but needed to be updated. The API it used is being retired by Dropbox at… Read more »

Read More