1 /**
2 * Copyright 2005-2013 The Kuali Foundation
3 *
4 * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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 package edu.sampleu.bookstore.document.attribs;
17
18 import org.kuali.rice.kew.api.KewApiConstants;
19
20 /**
21 * Searchable attribute for book title
22 * TODO: probably needs to be wired up to extension repository for remote invocation
23 *
24 * <documentContent>
25 <applicationContent>
26 <org.kuali.rice.krad.workflow.KualiDocumentXmlMaterializer>
27 ...
28 <newMaintainableObject class="edu.sampleu.bookstore.maintenance.BookMaintainable">
29 <businessObject class="edu.sampleu.bookstore.bo.Book">
30 <title>asdfasdf</title>
31 <typeCode>ROM</typeCode>
32 <isbn/>
33 <publisher>asfdasdd</publisher>
34 <price>
35 <value>1212.00</value>
36 </price>
37 <rating>
38 <value>1</value>
39 </rating>
40 <authors>
41 <edu.sampleu.bookstore.bo.Author>
42 <authorName>asdfasdf</authorName>
43 <email>asdfasdf@gmailc.om</email>
44 <phoneNbr>123-123-1234</phoneNbr>
45 <active>true</active>
46 <addresses/>
47 <books/>
48 <newCollectionRecord>false</newCollectionRecord>
49 <extension class="edu.sampleu.bookstore.bo.Account">
50 <bankName>asdfasdf</bankName>
51 <accountNumber>12345</accountNumber>
52 <newCollectionRecord>false</newCollectionRecord>
53 </extension>
54 </edu.sampleu.bookstore.bo.Author>
55 </authors>
56 <newCollectionRecord>false</newCollectionRecord>
57 </businessObject>
58 <newCollectionLines/>
59 <inactiveRecordDisplay/>
60 <newCollectionLineNames/>
61 <documentNumber>3020</documentNumber>
62 <dataObject class="edu.sampleu.bookstore.bo.Book" reference="../businessObject"/>
63 <dataObjectClass>edu.sampleu.bookstore.bo.Book</dataObjectClass>
64 <maintenanceAction>New</maintenanceAction>
65 </newMaintainableObject>
66 ..
67 */
68 public class BookTitleSearchableAttribute extends XPathSearchableAttribute {
69 public BookTitleSearchableAttribute() {
70 super("book_title", KewApiConstants.SearchableAttributeConstants.DATA_TYPE_STRING, "//newMaintainableObject/businessObject/title/text()", "Book Title");
71 }
72 }