The general principle of duplicate is called an entity declination
, a content entity in a different context than the original one.
200 Cross Projects Variations
This section describes the different principles of declination where the project is the only variable.
For all variations in relation to the notion of language, please refer to section translation.
An object can be declined in projects and groups if it has the master
, group
and media
fields:
The
group
property must be determined, an object containing this one will always be linked to a groupThe
media
property is not necessarily determined:If it is completed, the object belongs to the project and will be accessible and usable only from the project.
If it is empty, the object belongs to the group only.
Generally speaking, objects in this category are objects that we want to distribute within the group where they will be declined. The projects of the group, according to the configuration of the application will be free to exploit them or not.
There are several functional methods for decaying an object in a group according to the project variables but, technically, they use all these fields to work.
However, they may use other properties to provide other functions.
All the project variations of the same instance are presented in an tab other projects
accessible from the visualization action.
200 Cross Projects Variations
To be able to copy content to another project, you must have installed the following components:
an object to be copied must inherit from the object
contentobject
at least the following information:property
master
property
lang
(not required)property
media
property
mediagroup
The product plugin
WXM_Mediacore
must be enabled and theisPushContentActive
parameter must be set toyes
Security must allow users to create objects (domain
objectdata
andinsert
action)
200 Cross Projects Variations
In the back-office, the copying to another project
functionality allows you to easily perform a declination from the visualization of an object:
in the toolbar, click the' copy to another project' button.
a window will open where you can select up to three actions:
make a single copy
propose the content (see content proposal)
impose content (see content imposition)
Select the content destinations
Setting up the new objects (optional step see setting up the new objects)
Confirm the action to be performed
A result page shows the objects created
Tip
The project selection list only shows projects where the user can create content and where there is not yet a declination of that content. It is therefore possible that the list presented may be empty in some cases.
200 Cross Projects Variations
You can simply intervene on the declination stepboard simply via labels:
Action selection
The selection of the action depends on several criteria specific to each of these actions. The declination of an object to another project will always be available, go to the "imposition" and "proposal" sections for more information on their activation.
Project selection
The smalllist
showing destination projects uses fields with the label wxm_datapushcontent_field
by default. If no field has it, the standard operation applies.
The list of displayed projects is the one where the current object is not declined. For objects configured as "content objects" (see settings and object configuration), you can apply an automatic filter to hide layout-driven projects and prevent, for example, users from manually pushing an object into a DTP project. This filter is not active by default. To enable it, you must change the value of the pushContentShowLayoutDrivenProjects
parameter of the WXM_MediaCore
plugin.
List of results
The smalllist
presenting newly created objects uses by default fields labeled wxm_datapushcontent_field
.
If no fields are shown on this label then the standard operation will apply.
200 Cross Projects Variations
During the declination action, the system creates a new object for the selected project context by duplicating the source and changing some properties automatically:
the media will be the one of destination
If the object is linked to other object instances via the attribution notion (child, childmulti) and these objects are also declineable, the system will automatically retrieve equivalent versions to update the property.
Caution
If no matching object is found in the desired context, the property will be empty. This implies that if the property is required by its structure configuration, an error will be removed and the declination action cancelled for this project. (see article on standard errors).
Caution
We do not make a cascade declination: if you want this type of behavior you must customize it.
Manually configure a property during declination
You can manually override a property when declining. Indeed, the creation of a declination using the module WmsUtils
, forced in the new object as well as a java.util.HashSet
we pass in parameter a java.util.HashMap
with the values which will be objects of collection not to duplicate (for example paragraphs).
The project declination action is datapushcontent
. When creating, we call the following JSPs:
- /bov3/datapushcontent/initNotCopiedObjects.jsp
initializes java.util.hashSet objects not to be copied cascade. You can customize this JSP in your SAN this way:
<%@page pageEncoding="ISO-8859-15"%> <%@taglib prefix="noheto" uri="/WEB-INF/noheto.tld" %> <%@taglib prefix="c" uri="/WEB-INF/c.tld" %> <%-- /san/bov3/datapushcontent/initNotCopiedObjects.jsp --%> <% java.util.Set notCopiedObjects = (java.util.HashSet) request.getAttribute("notCopiedObjects"); if (notCopiedObjects == null) { notCopiedObjects = new java.util.HashSet(); } // collections of' frontlink' type objects are not duplicated notCopiedObjects.add("frontlink"); request.setAttribute("notCopiedObjects", notCopiedObjects); %>
/bov3/datapushcontent/initForcedValues.jsp
initializes the java. HashMap utility and iter on each object’s properties to overload them when copying.
You can customize a field in two ways:
if you specify the name or position of the property as a key:
you will overload the property globally, i. e. it will be applied regardless of the nature of the object.if you specify as key[object name].property name or index]:
you will overload the property in a fine way, i.e. it will be applied only for the nature of the specified object.<%@page pageEncoding="ISO-8859-15"%> <%@taglib prefix="noheto" uri="/WEB-INF/noheto.tld" %> <%@taglib prefix="c" uri="/WEB-INF/c.tld" %> <%-- /san/bov3/datapushcontent/initForcedValues.jsp --%> <% java.util.Map forcedValues = (java.util.Map) request.getAttribute("forcedValues"); if (forcedValues == null) { forcedValues = new java.util.HashMap(); } /* During a declination, we always want to empty the' tag' field of the product so that the user re-enters the tag assossiations with project-specific information. destination */ if (!forcedValues.containsKey("tag")) { forcedValues.put("tag", ""); } request.setAttribute("forcedValues", forcedValues);
You can also customize properties by fields by overloading the properties in this way:
[objects/[object name]]/bov3/datapushcontent/forcedvalues/properties/[property native type]/[property nature]/[property name].jsp
[objects/[object name]]/bov3/datapushcontent/forcedvalues/properties/[property name].jsp
[objects/[object name]]/bov3/datapushcontent/forcedvalues/properties/[property native type]/[property type].jsp
Within these JSPs, you can work with the following variables:
form_object | nature of the current object in short declination |
---|---|
activeRefererObject | reference object in declination |
itemValue |
|
colfield | name of the current property |
nature | nature of the object pointed out in the context of an attribution relationship |
forcedValues |
|
200 Cross Projects Variations
During a project declination, errors are displayed in the results list.
Here are the error codes you may encounter:
not_connected | Your session has expired, you need to log in again. |
---|---|
function_not_activates | The project declination function is disabled. You must refer to your administrator. |
object_not_found | The object to translate does not exist. |
not_authorized | You don’t have the necessary rights to see the instance. The destination project must be accessible to the user, make sure that he has access to it. |
not_compliant | The requested object does not have the necessary properties for the declination function (see technical prerequisites). |
mandatoryFields | The object could not be created because some mandatory fields are empty. This error is often solved because a match could not be found on an association. The value associated with this error is the list of fields that are empty. |