...
Updating of allocations
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.
Warning | ||
---|---|---|
| ||
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). |
Warning | ||
---|---|---|
| ||
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:
Code Block <%@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.Code Block <%@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 |
|
...