Lines 77-82
Link Here
|
77 |
|
77 |
|
78 |
<target name="test"> |
78 |
<target name="test"> |
79 |
<echo>This is a test of the AntTask: ${text}</echo> |
79 |
<echo>This is a test of the AntTask: ${text}</echo> |
|
|
80 |
<taskdef name="ant-test" classname="org.apache.lenya.cms.ant.TestTask"/> |
81 |
<ant-test/> |
80 |
</target> |
82 |
</target> |
81 |
|
83 |
|
82 |
|
84 |
|
Lines 103-287
Link Here
|
103 |
/> |
105 |
/> |
104 |
</target> |
106 |
</target> |
105 |
|
107 |
|
106 |
<taskdef name="init-history" classname="org.apache.lenya.cms.ant.InitWorkflowHistoryTask"/> |
|
|
107 |
<target name="create"> |
108 |
|
109 |
<property name="create.parent-id" value=""/> |
110 |
<property name="create.child-id" value=""/> |
111 |
<property name="create.child-name" value=""/> |
112 |
<property name="create.child-type" value=""/> |
113 |
<property name="create.doctype" value=""/> |
114 |
<property name="create.language" value=""/> |
115 |
<property name="create.title" value=""/> |
116 |
<property name="create.creator" value=""/> |
117 |
<property name="create.description" value=""/> |
118 |
<property name="create.subject" value=""/> |
119 |
<property name="create.publisher" value=""/> |
120 |
<property name="create.date" value=""/> |
121 |
<property name="create.rights" value=""/> |
122 |
<property name="create.columns" value=""/> |
123 |
<property name="create.userid" value=""/> |
124 |
<property name="create.ipaddress" value=""/> |
125 |
<property name="create.visible" value=""/> |
126 |
|
127 |
<taskdef name="create" classname="org.apache.lenya.cms.ant.DocumentCreatorTask"/> |
128 |
<create |
129 |
authoringpath="${authoring.dir}" |
130 |
area="${authoring.area}" |
131 |
parentid="${create.parent-id}" |
132 |
childid="${create.child-id}" |
133 |
childname="${create.child-name}" |
134 |
childtype="${create.child-type}" |
135 |
documenttype="${create.doctype}" |
136 |
language="${create.language}" |
137 |
visibleinnav="${create.visible}" |
138 |
/> |
139 |
|
140 |
<!-- Init the workflow history --> |
141 |
<echo>init the workflow history with document-id: ${create.parent-id}/${create.child-id}</echo> |
142 |
<echo>with document-type: ${create.doctype}</echo> |
143 |
<echo>with language: ${create.language}</echo> |
144 |
<echo>with user ID: ${create.userid}</echo> |
145 |
<echo>with IP address: ${create.ipaddress}</echo> |
146 |
<init-history |
147 |
documentid="${create.parent-id}/${create.child-id}" |
148 |
documenttype="${create.doctype}" |
149 |
language="${create.language}" |
150 |
userid="${create.userid}" |
151 |
machineip="${create.ipaddress}" |
152 |
/> |
153 |
|
154 |
<!-- Add the meta data to the newly created file. --> |
155 |
<property name="document.file" value=""/> |
156 |
<mapdocumentidtofile |
157 |
area="${authoring.area}" |
158 |
documentid="${create.parent-id}/${create.child-id}" |
159 |
language="${create.language}" |
160 |
propertyname="document.file" |
161 |
/> |
162 |
<tempfile property="temp.file" destDir="work"/> |
163 |
<xslt in="${document.file}" |
164 |
out="${temp.file}" |
165 |
force="true" |
166 |
style="${pub.dir}/../../xslt/authoring/addMetaData.xsl"> |
167 |
<param name="title" expression="${create.title}"/> |
168 |
<param name="creator" expression="${create.creator}"/> |
169 |
<param name="subject" expression="${create.subject}"/> |
170 |
<param name="description" expression="${create.description}"/> |
171 |
<param name="language" expression="${create.language}"/> |
172 |
<param name="publisher" expression="${create.publisher}"/> |
173 |
<param name="date" expression="${create.date}"/> |
174 |
<param name="rights" expression="${create.rights}"/> |
175 |
<param name="columns" expression="${create.columns}"/> |
176 |
</xslt> |
177 |
<move file="${temp.file}" tofile="${document.file}"/> |
178 |
</target> |
179 |
|
180 |
<!-- Create a copy of an existing document for a new language --> |
181 |
<target name="create-language"> |
182 |
|
183 |
<property name="create.document-id" value=""/> |
184 |
<property name="create.doctype" value=""/> |
185 |
<property name="create.child-name" value=""/> |
186 |
<property name="create.old.language" value=""/> |
187 |
<property name="create.new.language" value=""/> |
188 |
<property name="create.title" value=""/> |
189 |
<property name="create.creator" value=""/> |
190 |
<property name="create.description" value=""/> |
191 |
<property name="create.subject" value=""/> |
192 |
<property name="create.publisher" value=""/> |
193 |
<property name="create.date" value=""/> |
194 |
<property name="create.rights" value=""/> |
195 |
<property name="create.userid" value=""/> |
196 |
<property name="create.ipaddress" value=""/> |
197 |
|
198 |
<!-- Add a node to the tree --> |
199 |
<taskdef name="insertlabel" classname="org.apache.lenya.cms.ant.InsertLabelTask"/> |
200 |
<insertlabel |
201 |
documentid="${create.document-id}" |
202 |
labelName="${create.child-name}" |
203 |
language="${create.new.language}" |
204 |
area="${authoring.area}" |
205 |
/> |
206 |
|
108 |
|
207 |
<!-- Init the workflow history --> |
|
|
208 |
<echo>init the workflow history with document-id: ${create.document-id}</echo> |
209 |
<echo>with document-type: ${create.doctype}</echo> |
210 |
<echo>with language: ${create.new.language}</echo> |
211 |
<init-history |
212 |
documentid="${create.document-id}" |
213 |
documenttype="${create.doctype}" |
214 |
language="${create.new.language}" |
215 |
userid="${create.userid}" |
216 |
machineip="${create.ipaddress}" |
217 |
/> |
218 |
|
219 |
<!-- Copy the existing file over --> |
220 |
<property name="document.old.file" value=""/> |
221 |
<mapdocumentidtofile |
222 |
area="${authoring.area}" |
223 |
documentid="${create.document-id}" |
224 |
language="${create.old.language}" |
225 |
propertyname="document.old.file" |
226 |
/> |
227 |
<echo>Old file: ${document.old.file}</echo> |
228 |
<property name="document.new.file" value=""/> |
229 |
<mapdocumentidtofile |
230 |
area="${authoring.area}" |
231 |
documentid="${create.document-id}" |
232 |
language="${create.new.language}" |
233 |
propertyname="document.new.file" |
234 |
/> |
235 |
<echo>New file: ${document.new.file}</echo> |
236 |
|
237 |
<echo>Add the meta data to the newly created file: ${document.new.file}</echo> |
238 |
<!-- Add the meta data to the newly created file. --> |
239 |
<xslt in="${document.old.file}" |
240 |
out="${document.new.file}" |
241 |
force="true" |
242 |
style="${pub.dir}/../../xslt/authoring/addMetaData.xsl"> |
243 |
<param name="title" expression="${create.title}"/> |
244 |
<param name="creator" expression="${create.creator}"/> |
245 |
<param name="subject" expression="${create.subject}"/> |
246 |
<param name="description" expression="${create.description}"/> |
247 |
<param name="language" expression="${create.new.language}"/> |
248 |
<param name="publisher" expression="${create.publisher}"/> |
249 |
<param name="date" expression="${create.date}"/> |
250 |
<param name="rights" expression="${create.rights}"/> |
251 |
</xslt> |
252 |
</target> |
253 |
|
254 |
<!-- Remove a language from an existing document --> |
255 |
<target name="remove-language"> |
256 |
|
257 |
<property name="remove.label.document-id" value=""/> |
258 |
<property name="remove.label.label-name" value=""/> |
259 |
<property name="remove.label.language" value=""/> |
260 |
|
261 |
<!-- Remove a label from a node in the tree --> |
262 |
<echo>Remove label: ${remove.label.label-name}</echo> |
263 |
<echo>for language: ${remove.label.language}</echo> |
264 |
<echo>from document: ${remove.label.document-id}</echo> |
265 |
<echo>in area: ${authoring.area}</echo> |
266 |
<taskdef name="removelabel" classname="org.apache.lenya.cms.ant.RemoveLabelTask"/> |
267 |
<removelabel |
268 |
documentid="${remove.label.document-id}" |
269 |
labelName="${remove.label.label-name}" |
270 |
language="${remove.label.language}" |
271 |
area="${authoring.area}" |
272 |
/> |
273 |
<!-- Remove the language document --> |
274 |
<property name="document.file" value=""/> |
275 |
<mapdocumentidtofile |
276 |
area="${authoring.area}" |
277 |
documentid="${remove.label.document-id}" |
278 |
language="${remove.label.language}" |
279 |
propertyname="document.file" |
280 |
/> |
281 |
<echo>Remove file: ${document.file}</echo> |
282 |
<delete file="${document.file}"/> |
283 |
</target> |
284 |
|
285 |
<!-- Save the dublin core meta data --> |
109 |
<!-- Save the dublin core meta data --> |
286 |
<target name="save-meta-data"> |
110 |
<target name="save-meta-data"> |
287 |
|
111 |
|
Lines 396-411
Link Here
|
396 |
<echo>the document id for the copy is now ${node.newdocumentid}</echo> |
220 |
<echo>the document id for the copy is now ${node.newdocumentid}</echo> |
397 |
</target> |
221 |
</target> |
398 |
|
222 |
|
399 |
<target name = "newnamedocumentid"> |
|
|
400 |
<taskdef name="computerenamedocumentid" classname="org.apache.lenya.cms.ant.ComputeRenameDocumentId"/> |
401 |
<computerenamedocumentid |
402 |
area="authoring" |
403 |
firstdocumentid="${node.firstdocumentid}" |
404 |
secdocumentid="${node.secdocumentid}" |
405 |
/> |
406 |
<echo>the document id for the renamed file is now ${node.newdocumentid}</echo> |
407 |
</target> |
408 |
|
409 |
<taskdef name="computearchivedocumentid" classname="org.apache.lenya.cms.ant.ComputeArchiveDocumentId"/> |
223 |
<taskdef name="computearchivedocumentid" classname="org.apache.lenya.cms.ant.ComputeArchiveDocumentId"/> |
410 |
|
224 |
|
411 |
<target name = "newarchivedocumentid"> |
225 |
<target name = "newarchivedocumentid"> |
Lines 623-670
Link Here
|
623 |
|
437 |
|
624 |
</target> |
438 |
</target> |
625 |
|
439 |
|
626 |
<taskdef name="renameLabel" classname="org.apache.lenya.cms.ant.RenameLabelTask"/> |
|
|
627 |
|
628 |
<target name = "rename-label"> |
629 |
<property name="rename.label.document-id" value=""/> |
630 |
<property name="rename.label.label-name" value=""/> |
631 |
<property name="rename.label.language" value=""/> |
632 |
<property name="rename.label.area" value=""/> |
633 |
|
634 |
<echo>Rename Label</echo> |
635 |
<renameLabel |
636 |
documentid="${rename.label.document-id}" |
637 |
labelName="${rename.label.label-name}" |
638 |
language="${rename.label.language}" |
639 |
area="${rename.label.area}" |
640 |
/> |
641 |
</target> |
642 |
|
440 |
|
643 |
<taskdef name="changeVisibility" classname="org.apache.lenya.cms.ant.ChangeVisibilityTask"/> |
|
|
644 |
|
645 |
<target name = "change-visibility"> |
646 |
<property name="change.visibility.document-id" value=""/> |
647 |
<property name="change.visibility.area" value=""/> |
648 |
|
649 |
<echo>Change Visibility</echo> |
650 |
<changeVisibility |
651 |
documentid="${change.visibility.document-id}" |
652 |
area="${change.visibility.area}" |
653 |
/> |
654 |
</target> |
655 |
|
656 |
<target name = "moveDocument" depends="firstareaproperties, |
441 |
<target name = "moveDocument" depends="firstareaproperties, |
657 |
secareaproperties, newcopydocumentid, firstdocumentpath, |
442 |
secareaproperties, newcopydocumentid, firstdocumentpath, |
658 |
secdocumentpath, move, rewrite-links"> |
443 |
secdocumentpath, move, rewrite-links"> |
659 |
<echo>moveDocument</echo> |
444 |
<echo>moveDocument</echo> |
660 |
</target> |
445 |
</target> |
661 |
|
446 |
|
662 |
<target name = "renameDocument" depends="firstareaproperties, |
|
|
663 |
secareaproperties, newnamedocumentid, firstdocumentpath, |
664 |
secdocumentpath, move, rewrite-links"> |
665 |
<echo>renameDocument</echo> |
666 |
</target> |
667 |
|
668 |
<target name = "setIdentifier"> |
447 |
<target name = "setIdentifier"> |
669 |
<taskdef name="setidentifier" classname="org.apache.lenya.cms.ant.SetIdentifier"/> |
448 |
<taskdef name="setidentifier" classname="org.apache.lenya.cms.ant.SetIdentifier"/> |
670 |
<setidentifier |
449 |
<setidentifier |
Lines 713-732
Link Here
|
713 |
|
492 |
|
714 |
</target> |
493 |
</target> |
715 |
|
494 |
|
716 |
<target name="movenode"> |
|
|
717 |
<property name="movenode.documentid" value=""/> |
718 |
<property name="movenode.direction" value=""/> |
719 |
|
720 |
<echo>Moving sitetree node</echo> |
721 |
<echo>Document ID: ${movenode.documentid}</echo> |
722 |
<echo>Direction: ${movenode.direction}</echo> |
723 |
|
724 |
<taskdef name="movenodeupdown" classname="org.apache.lenya.cms.ant.MoveSiteTreeNodeTask"/> |
725 |
<movenodeupdown |
726 |
documentid="${movenode.documentid}" |
727 |
direction="${movenode.direction}" |
728 |
/> |
729 |
</target> |
730 |
|
495 |
|
731 |
<target name="deletecache"> |
496 |
<target name="deletecache"> |
732 |
<delete dir="${cachedir}"/> |
497 |
<delete dir="${cachedir}"/> |