3.4.6 Required Attributes in Virtual Folders
Required attributes
is a feature that allows users to automatically give children objects of a
given collection a specific set of attributes upon insertion.
Required attributes are explained in detail on
page
149, including a description of the correct syntax for entering Required
Child Attributes. This same syntax is used when using Hyperwave Virtual
Folders, and it is important that you read this before you add Required Child
Attributes.
ADDING ATTRIBUTES HW_REQCHILDATTR
To add a Required Child Attribute in Hyperwave Virtual Folders:
- In the Windows Explorer, click with the right mouse button on the
Hyperwave Neighborhood object for which you wish to add the required attribute.
- From the context-sensitive menu, choose Properties.
- In the Properties dialog box (see Figure 117), type HW_ReqChildAttr
in the text box labeled Attribute Name, or select it from the drop box..
In the text box labeled Attribute Value, type the Type and Name
definitions and any other variants you wish to set. Be sure to use the correct
syntax, as described on
page
150.
- Click on the Add button. The HW_ReqChildAttr will appear in the
listing of attributes.
- Click on the OK button.
The Required Child Attribute is now set
for this container, and any new container (and its subcontainers) uploaded to
it will automatically receive the attribute defined by HW_ReqChildAttr.
The next step is to insert a new container into the collection for which you
have set the Required Child Attributes.
INSERTING A NEW CONTAINER
To insert a new container in Hyperwave Virtual Folders:
- Click with the right mouse button on the collection into which you wish to
insert the new container.
- From the context-sensitive menu that appears, choose New.
- In the dialog box that appears (see Figure 124), enter a Name (URL) and a
Title for the collection, specify the Title language and select the Type of
collection you wish to enter (MultiCluster, Sequence, etc.)
- Click on the OK button.
Figure 124: Inserting a new Collection in Virtual
Folders
- When you insert a new collection into a container that has been assigned a
HW_ReqChildAttr, you will be prompted with a dialog box where you confirm the
required attributes and their associated values, (see the example in Figure
125), or modify any of the attribute values. This dialog box will not appear if
you have specified the prompt value as false when defining the Required Child
Attribute.
Figure 125: Example of a Required Attributes dialog box
INSERTING
MULTIPLE OBJECTS
Inserting multiple objects results in a single user interaction to input the
values for the additional attributes defined by the destination container. All
new objects get the same set of attribute-value pairs.
INSERTING CONTAINER HIERARCHIES
Inserting container hierarchies is handled in the same way; i.e. only the
destination container defines the additional attributes. Already existing
subcontainers with different attribute definitions have no affect on the object
creation process.
There are two rules for the insertion process:
Values entered by the user overwrite already defined values for objects in
subfolders etc. User inputs are always applied to modified objects.
Values not entered by the user are not propagated to objects already having
that attribute. That means that current values are never overwritten by a
default value. New objects and objects missing an attribute get the attribute
with the defined default value.
BEHAVIOR IN CASE OF COLLISIONS
It is possible for collisions to occur between existing objects and objects
being uploaded when uploading a directory with Virtual Folders. A collision
occurs when you try to upload an object to a collection and an object with the
same Title and DocType attributes. The behavior of Required Child
Attributes during collisions is described by case below.
When there is a collision, the user is asked if the object should be
replaced.
When using HMI files, behavior is as follows:
The object is not changed, i.e. newly entered values for a
Required Child Attribute are not used in the object
- Attribute exists:
- The entered value overwrites the value in the HMI file.
Required Child
Attribute definitions exist:
- For containers, the Required Child Attribute definitions from the HMI file
are merged with the Required Child Attribute definitions of the destination
collection, i.e., the old definitions remain and are supplemented by those in
the destination collection.
Attribute doesn't exist:
- The Attribute is inserted into the object with the entered value.
No
Required Child Attribute definitions exist:
- Containers get the Required Child Attribute definitions of the destination
collection.
When not using HMI files, behavior is as
follows:
The object is not touched, i.e. newly entered values for a
Required Child Attribute are not used in the object
- Documents
- The object is newly created on the server, i.e. a new object is generated
that contains only the attributes from the Required Child Attribute definitions
in the destination collection. All other non-system attributes are lost because
there is no HMI file.
Containers
- Container containers are also newly created on the server, i.e. Required
Child Attribute definitions on the server are lost and are replaced by those in
the destination collection.
It is recommended that when one is
working with collection hierarchies that have different Required Child
Attribute definitions in different subcollections, one should always work with
HMI files. This means that one should download the collection first in order to
get the HMI files (and thus the Required Child Attribute definitions) in the
first place. Further, only the destination collection has an effect on
documents being uploaded. When uploading a directory structure, only the
Required Child Attributes of the destination collection are evaluated. Any
other definitions in existing subcollections are not taken into consideration,
and when using HMI files, they are overwritten.
|
Benutzer: gast
Besitzer: hwsystem Zuletzt geändert am:
|
|
|