Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Adds the entities defined in the specified XML file(s) to the portal database. If the specified entities are already present – determined by Id, Name, or other primary key, as appropriate – this operation will update the existing entity to match the information provided in the XML.  Importing the same file several times has the same effect as importing it once – you are free to re-import files without negative consequence (though see Warning below).

Usage
Code Block

  >ant crn-import -Ddir={path-to-directory} [-Dpattern={regex}]

...

Note
titleThe -Dpattern Argument

Regex special characters overlap heavily with OS/Shell special characters. It's often better to avoid the -Dpattern argument altogether. You can always place desired files into a new directory for import.

Warning
titleWarning

Never re-import an outdated .fragment-layout file against a portal database with existing users. There is a risk that the folder and channel nodes on the fragment will receive new IDs that don't match up with the existing IDs, and (therefore) users' customizations to that fragment will become corrupted. Always export a .fragment-layout first, apply your changes, then re-import. The fresh export will contain the proper IDs, which will be restored on import.

NOTE: It's a good idea to test this process and verify that it's working correctly before attempting it on production.

Deployments that do not allow user customizations to DLM fragments are exempt from this warning.

Export

Creates XML files representing the requested entities and writes them to the specified file system location.

Usage
Code Block

  >ant crn-export [-Ddir={path-to-directory}] -Dtype={entity-type} [-Dsysid={entity-identifier}]

...

Info
titleNamed Sub-directories

On export, XML documents will be organized into sub-directories by entity type: e.g. channel, layout, user, etc.

Delete

Removes the specified entities as well as dependent (orphaned) entities from the portal database.

Warning
titleWarning

The DELETE feature should be used with extreme caution and is more appropriate for DEV and TEST portals than for PROD. It is possible to make your portal unusable by deleting the wrong thing.

Usage
Code Block
  >ant crn-delete -Dtype={entity-type} [-Dsysid={entity-identifier}]

Where entity-type is any supported entity type (see table below); and entity-identifier is the Id or Name of a single entity of the specified type.

Table of Entity Types

entity-type

sysid

export

delete

notes

all

(error)

All portal entities

(error) 

Combines the following sub-types:

  • all-layouts
  • all-profiles
  • all-permission_sets
  • all-channels
  • all-channel-types
  • all-users
  • all-themes
  • all-structures
  • all-entity-types
  • all-group_memberships
  • all-fragment-definitions

all-layouts

(error)

All user layouts

(error)

Normal users generate .layout files on export; fragment owners generate .fragment-layout

all-profiles

(error)

All user profiles

(error)

May generate more than one document per user

all-permissions

(error)

All permissions

(error)

A permission entity is one owner, target, activity, type, and principal; not exported on -Dtype=all since the data is covered by the permission_sets type

all-permission_sets

(error)

All permission_sets

(error)

A permission_set entity is one owner, target, activity, and type, but zero or more principals

all-memberships

(error)

All local (RDBMS) memberships

(error) 

A membership entity refers to one parent and one child; not exported on -Dtype=all since the data is covered by the group_memberships type

all-channels

(error)

All channels

(error)

 

all-channel-types

(error)

All channel types

(error)

 

all-groups

(error)

All local (RDBMS) groups

(error) 

A group entity simply describes a group (not its children); not exported on -Dtype=all since the data is covered by the group_memberships type

all-group_memberships

(error)

All local (RDBMS) group_memberships

(error) 

A group_membership entity describes a group and refers to all of its children

all-users

(error)

All users

(error)

 

all-themes

(error)

All themes

(error)

 

all-structures

(error)

All structures

(error)

 

all-entity-types

(error)

All entity types

(error)

"Entity types" here refers to the UP_ENTITY_TYPES table; these are not the same as Import/Export entity types

all-fragment-definitions

(error)

All fragment definitions

(error)

Requires the RDBMConfigurationLoader

layout

username

 

 

 

profile

username

 

 

May generate more than one document per user

channel

fname

 

 

 

channel-type

name

 

 

 

group

name

 

  

A group entity simply describes a group (not its children)

group_membership

name

 

  

A group_membership entity describes a group and refers to all of its children

user

username

 

 

 

theme

name

 

 

 

structure

name

 

 

 

entity-type

name

 

 

 

fragment-definition

name

 

 

 

...