Alfresco 3 Cookbook
上QQ阅读APP看书,第一时间看更新

Introduction

Alfresco is a Content Management System ready for your Enterprise. You can store and manage your contents in a logical collection named Spaces. In your desktop, you store your files and documents in folders. In other words, folders or directories help you organize your files. Similarly, in Alfresco also, you store and systematize your contents in various folders. In addition to storing contents, spaces in Alfresco can execute scripts and actions as well. We will explore this in greater detail in Chapter 4.

As your document management system, Alfresco enables you to upload documents, set the details of your documents, tag or classify your documents, and manage the versions of the documents.

In this chapter, you will learn how to use the Alfresco Explorer application to create and organize your contents using spaces, as well as how to upload and manage the details of the documents.

Content metadata

Metadata is "data about data". Content metadata is the details or information about content. If we take an example of a document in your hard disk, the metadata of the document is name, created date, author, date modified, title, and so on.

In this example, we are looking at the properties of a file named logo.gif in my computer. When we right-click on the file and open the Properties dialog, we can view the file property sheet.

Here the properties like Name, Item type, Folder path, Date created, Date modified, Size, and so on are the information or details about this file. This information is the metadata of the file. Windows (or your Operating System), by default, associates some metadata with every file in the disk.

The set of properties being applied to the file depends on the file. For example, in case of an mp3 audio file, the following properties are associated:

And in the case of an mpg video file, additional metadata used are shown in the following screenshot:

Thus, as you have seen, a different set of properties or metadata can be applied to content or to a file depending on the type of the file. The first set of properties are the same for all the files in Windows—for example, every file would have a name, a create date, a modify date, an author, and so on.

But in addition to these similar properties, there are some specific properties applied depending on the type of the file—for example, an mp3 audio file would have extra metadata like album, year, genre, length, artist, and so on; and an mpg video would have metadata like frame width, frame height, data rate, and so on.

The type of the file in Windows can be treated as the content types in Alfresco. Alfresco, by default, comes with a base type named cm:content. This should be used as the base type for all custom types we create for different content in Alfresco. This consists of standard metadata such as name, creates date, modify date, created by, modified by, and so on. Similarly, for spaces, there is a type cm:folder; for users, the type is cm:person.

This preceding screenshot shows the default metadata information of the HTML content we had created in the previous recipe. All these metadata structures have been supplied by Alfresco content model; we had entered the values of the metadata. The create date, modify date, and so on are read-only values to you, naturally Alfresco automatically sets these values.

Usually your requirements go beyond the default metadata set supplied by Alfresco. You would like to have your own properties, so that you can identify your content more accurately.

For example, you are uploading your invoice document, and along with this document, you want to enter the invoice number, invoice date, client name, and so on. For this, you will have to create a new content model with this new metadata set. Aspects, in Alfresco, are a modular set of properties and behaviors that can be dynamically associated with contents. For example, versionable aspect in Alfresco adds the versioning capability and features with content. Alfresco, thus offers a number of aspects which can be associated with documents in order to add more dynamic behavior of contents. You also create your own aspects and introduce modularity and re-usability of behavior of contents.

Later on, we will learn how to create your custom content model, type, and aspects along with your own properties, metadata, and details.