001/** 002 * Copyright 2005-2014 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package edu.sampleu.bookstore.document.attribs; 017 018import org.kuali.rice.kew.api.KewApiConstants; 019 020/** 021 * Searchable attribute for book title 022 * TODO: probably needs to be wired up to extension repository for remote invocation 023 * 024 * <documentContent> 025 <applicationContent> 026 <org.kuali.rice.krad.workflow.KualiDocumentXmlMaterializer> 027 ... 028 <newMaintainableObject class="edu.sampleu.bookstore.maintenance.BookMaintainable"> 029 <businessObject class="edu.sampleu.bookstore.bo.Book"> 030 <title>asdfasdf</title> 031 <typeCode>ROM</typeCode> 032 <isbn/> 033 <publisher>asfdasdd</publisher> 034 <price> 035 <value>1212.00</value> 036 </price> 037 <rating> 038 <value>1</value> 039 </rating> 040 <authors> 041 <edu.sampleu.bookstore.bo.Author> 042 <authorName>asdfasdf</authorName> 043 <email>asdfasdf@gmailc.om</email> 044 <phoneNbr>123-123-1234</phoneNbr> 045 <active>true</active> 046 <addresses/> 047 <books/> 048 <newCollectionRecord>false</newCollectionRecord> 049 <extension class="edu.sampleu.bookstore.bo.Account"> 050 <bankName>asdfasdf</bankName> 051 <accountNumber>12345</accountNumber> 052 <newCollectionRecord>false</newCollectionRecord> 053 </extension> 054 </edu.sampleu.bookstore.bo.Author> 055 </authors> 056 <newCollectionRecord>false</newCollectionRecord> 057 </businessObject> 058 <newCollectionLines/> 059 <inactiveRecordDisplay/> 060 <newCollectionLineNames/> 061 <documentNumber>3020</documentNumber> 062 <dataObject class="edu.sampleu.bookstore.bo.Book" reference="../businessObject"/> 063 <dataObjectClass>edu.sampleu.bookstore.bo.Book</dataObjectClass> 064 <maintenanceAction>New</maintenanceAction> 065 </newMaintainableObject> 066 .. 067 */ 068public class BookTitleSearchableAttribute extends XPathSearchableAttribute { 069 public BookTitleSearchableAttribute() { 070 super("book_title", KewApiConstants.SearchableAttributeConstants.DATA_TYPE_STRING, "//newMaintainableObject/businessObject/title/text()", "Book Title"); 071 } 072}