Vous êtes sur la page 1sur 11

ATG Asset Versioning

10 June 2013

ATG Asset Versioning

Page 1

Session Objectives

Versioning Overview Versioning Terminology OOTB Versioning Repository Versioning Process Tables in Versioned DB Register the Versioned Repositories

10 June 2013

Page 2

Versioning Terminology
Asset A resource under the control of the version management system used by ATG Content Administration for example, foo.html. An asset maintains a list of its own asset versions. Asset version A specific version of an assetfor example, version 2 of foo.html. Each asset version has a unique version number. The initial version of an asset is always version 1. When a new asset version is created, it is immediately assigned the next available version number. Head version The most recent version of an asset for a particular branch. Development line In other version management systems, a set of assets is often called a line of development or code line. In ATG Content Administration, a development line is one of the following: Branch: A named, modifiable line of development that includes a specific set of assets. ATG Content Administration provides an empty main branch. As part of the process of setting up your asset management server, you import your initial set of assets into the main branch. Branch assets are modifiable only if they are checked out into a workspace. Workspace: A working, editable set of asset versions. Workspaces are always created from branches. Asset versions are checked out into workspaces, where they can be edited or deleted. When a user creates a project in the ATG Business Control Center, the Version Manager is called to create a workspace for the project. The user can then add one or more asset versions into the project workspace. When the project is complete, the updated versions of the project assets are checked into the repository, and the workspace itself is marked as checked in. Snapshot: A set of assets identified by a timestamp in the database and the project checkin_date.
10 June 2013 Page 3

Versioned Repository
standard repositories store the data that ATG Content Administration requires:

VersionManagerRepository The /atg/epub/version/VersionManagerRepository is a GSARepository that stores the development lines (branches, workspaces, and snapshots) and asset version metadata used by the /atg/epub/VersionManagerService PublishingRepository The /atg/epub/PublishingRepository is a GSARepository that stores the items required by the ATG Business Control Center: processes, projects, workflows, and so on

10 June 2013

Page 4

Tables in Versioned DB

In order to store asset version metadata, the asset management servers database schema requires additional columns for the primary tables used by your applications repositories, and additional tables to store versioning information following columns to every table that represents a primary table for an item descriptor:
asset_version branch_id Counter that specifies the version of the asset. ID used to persist the branch of a version. Content Administration always sets this to the ID of the main branch. Flag that determines whether a version is the head of a branch. Stores the check-in date of a version. Null for working versions of assets.

is_head checkin_date

version_deleted
version_editable

Flag that indicates whether the asset version is a deleted version.


Flag that indicates whether the asset version is an editable version. That is, the version is a working version in a workspace, where modifications to it can be made. The asset version upon which this version was based. For example, if you create version 2 by checking out version 1, version 2s predecessor version is version 1. The ID of the workspace where the asset version was initially created.

pred_version

workspace_id

10 June 2013

Page 5

versioned repository to use shared tables. constraints apply to versioned repositories with shared database tables:

A versioned repository cannot support more than two shares of a table in a single repository definition.

to use table sharing with a versioned repository, also perform these steps To the shared tables database schema definition, add the version column sec_asset_version. This column must be defined as part of the primary key.

NOTE: Change all primary keys to composite primary keys, composed of the original primary key column(s) and the asset_version column. Create an index for the workspace_id and checkin_date columns that are added to each primary table. Remove from all tables:
All foreign key references. All unique constraints on columns. Also remove unique attributes from all

<property> tags. For more information, see the discussion on unique properties in the ATG Repository Guide.
All unique indexes on columns.

10 June 2013

ATG Asset Versioning

Page 6

Ex: - Non-versioned

Table

create table type_x ( type_x_id VARCHAR(16) NOT NULL, name VARCHAR(128) NULL, type_y_ref_id VARCHAR(16) NULL);

Alter table type_x add constraint pk_type_x primary key (type_x_id); Alter table type_x ADD CONSTRAINT fk_typye_x_1 FOREIGN KEY (type_y_ref_i) REFERENCES dcs_category(type_y_id);

Ex: - Versioned Table create table type_x ( type_x_id VARCHAR(16) NOT NULL, asset_version INT NOT NULL, branch_id VARCHAR(40) NOT NULL, is_head NUMERIC(1) NOT NULL, version_deleted NUMERIC(1) NOT NULL, version_editable NUMERIC(1) NOT NULL, workspace_id VARCHAR(40) NOT NULL, pred_version INT NULL, checkin_date TIMESTAMP NULL, name VARCHAR(128) NULL, type_y_ref_id VARCHAR(16) NULL ); Alter table type_x add constraint pk_type_x primary key (type_x_id); create index type_x_workspace_id on type_x (workspace_id); create index type_x_workspace_id on type_x (checkin_date);
10 June 2013 ATG Asset Versioning Page 7

Versioning Process

When you initially import assets into ATG Content Administration, the VersionManager creates version 1 of every imported asset. In the case of file assets, file names are appended with the string #1 When a user adds an existing asset to a project, the VersionManager checks out the head version from the main branch by copying the asset and assigning the next available version number to this copy. The VersionManager then adds the new version to the projects workspace. Within the project, users can modify this assets workspace version, or delete it from the versioning system. When the user completes the project, its workspace assets are checked into main, and the workspace itself is marked as checked in. A single user Scenario.

10 June 2013

Page 8

Versioning Process

Multi user Scenario.

10 June 2013

Page 9

Register the Versioned Repositories



All versioned repositories must be registered with Content Administration as follows: In the asset management servers localconfig layer, create this properties file: /atg/registry/ContentRepositories.properties Set its $class property as follows: $class=atg.repository.nucleus.RepositoryRegistryService Add the versioned repositories to the list property initialRepositories, in this format: initialRepositories+=\ versioned-repository[,versioned-repository]... For example: $class=atg.repository.nucleus.RepositoryRegistryService ... initialRepositories+=\ /atg/myApp/MyRepositoryVer1,\ /atg/myApp/MyRepositoryVer2

10 June 2013

Page 10

Thank You!

10 June 2013

ATG Asset Versioning

Page 11

Vous aimerez peut-être aussi