KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lenya > cms > authoring > DefaultBranchCreator


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17
18 /* $Id: DefaultBranchCreator.java 42598 2004-03-01 16:18:28Z gregor $ */
19
20 package org.apache.lenya.cms.authoring;
21
22 import java.io.File JavaDoc;
23
24 public class DefaultBranchCreator extends DefaultCreator {
25     /**
26      * Return the child type.
27      *
28      * @param childType a <code>short</code> value
29      *
30      * @return a <code>short</code> value
31      *
32      * @exception Exception if an error occurs
33      */

34     public short getChildType(short childType) throws Exception JavaDoc {
35         return BRANCH_NODE;
36     }
37
38     /** (non-Javadoc)
39      * @see org.apache.lenya.cms.authoring.DefaultCreator#getChildFileName(java.io.File, java.lang.String)
40      */

41     protected String JavaDoc getChildFileName(
42         File JavaDoc parentDir,
43         String JavaDoc childId,
44         String JavaDoc language) {
45         return parentDir
46             + File.separator
47             + childId
48             + File.separator
49             + "index"
50             + getLanguageSuffix(language)
51             + ".xml";
52     }
53
54     /** (non-Javadoc)
55      * @see org.apache.lenya.cms.authoring.DefaultCreator#getChildMetaFileName(java.io.File, java.lang.String)
56      */

57     protected String JavaDoc getChildMetaFileName(
58         File JavaDoc parentDir,
59         String JavaDoc childId,
60         String JavaDoc language) {
61         return parentDir
62             + File.separator
63             + childId
64             + File.separator
65             + "indexmeta"
66             + getLanguageSuffix(language)
67             + ".xml";
68     }
69 }
70
Popular Tags