Archive for the ‘Workareas’ Category

in a component, you can link to a specific page by using $PAGE_LINK[name of page].
for example $PAGE_LINK[help/howto] will link to the current site help/howto.page.

Using $URL_PREFIX works in a similar way so that area relative paths can be used,e.g. $URL_PREFIX/images/icons/favicon.png.

Advertisements

Users using CCPro aren’t necessarily very aware of where their files are in the content store, because they are given access to one and only one workarea and they remain there forever…

Every now and then, some users start crossing workarea boundaries and suddenly they look for files in the wrong area and get very confused.

If you need to let them know for a particular site which workarea they use, you can give them a link directly to the folder where their files are:

http://teamsite.acme.com/iw-cc/command/iw.ccpro.filesys?vpath=/default/main/mybranch/WORKAREA/myworkarea/sites/somesite

In TeamSite, things are not always what they seem. For example, the vpath of where we are when the instantiation form calls the datasource is passed in the DataSourceContext object. It enables us to retrieve the current workarea.

CSWorkarea workarea = client.getWorkarea(new CSVPath(dsContext.getServerContext()).getArea(), true);

Here’s a little code to create directories, based on their relative path in the workarea.

    public CSDir findOrCreateDir(String relativePath) {
        CSDir directory = null;
        try {
            directory = (CSDir) getArea().getFile(new CSAreaRelativePath(relativePath));
            if (directory == null) {
                System.out.println("directory " + relativePath + " does not exist.");
                try {
                    System.out.println("creating directory " + relativePath + ".");
                    directory = getArea().getRootDir().createChildDirectory(relativePath);
                } catch (CSException ex) {
                    System.out.print("unable to create directory");
                    Logger.getLogger(MyClass.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {
                System.out.println("found directory " + relativePath + ".");
            }
        } catch (CSException ex) {
            Logger.getLogger(CreateIntranetSiteAdditionalFilesTask.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            return (directory);
        }
}

Every time a submit action is performed, Teamsite records which files were submitted, who submitted them and what comments were entered by the user. This information is accessible in the submit log by selecting the View>Submit log menu item. When this information is accessed from the STAGING area, each submit action ever performed in the branch is listed. When this information is accessed from a workarea, each submit action ever performed emanating from the current workarea is listed.

Similarly to the submit log and submit operation, every update operation is recorded in the update log. When this information is accessed from the STAGING area, each update action ever performed in the branch is listed. When this information is accessed from a workarea, each update action ever performed emanating from the current workarea is listed.

An update operation is defined as copying files from one area to another. There are therefore three type of update operations: submit, get latest and copy to.

Operation

From

To

Description

Submit

Workarea

STAGING

Creates a new version of the asset in a new file and places it at the top of the pile of version files for the asset.

Get Latest

STAGING

Workarea

Creates a pointer to the file at the top of the pile of version files for the asset.

Copy to

Workarea

Workarea

Copies the file from one workarea to another