com.wewebu.ow.server.app
Class OwMimeManager.OwReplaceScanner

java.lang.Object
  extended by com.wewebu.ow.server.app.OwMimeManager.OwReplaceScanner
Enclosing class:
OwMimeManager

protected abstract static class OwMimeManager.OwReplaceScanner
extends Object

Class to perform search and replace on strings.
Derive a subclass and implement getReplacement. getReplacement is only called if pattern was found.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Constructor Summary
protected OwMimeManager.OwReplaceScanner()
           
 
Method Summary
protected abstract  String getReplacement(OwMainAppContext context_p, OwObjectReference obj_p, OwXMLUtil mimeNode_p)
          override with your replacement function
 String replace(OwMainAppContext context_p, OwObjectReference obj_p, String strIn_p, String strPattern_p, OwXMLUtil mimeNode_p)
          replace a string with the token from the overridden getReplacement method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwMimeManager.OwReplaceScanner

protected OwMimeManager.OwReplaceScanner()
Method Detail

replace

public String replace(OwMainAppContext context_p,
                      OwObjectReference obj_p,
                      String strIn_p,
                      String strPattern_p,
                      OwXMLUtil mimeNode_p)
               throws Exception
replace a string with the token from the overridden getReplacement method

Parameters:
strIn_p - String string to search and replace
strPattern_p - String to search
mimeNode_p - OwXMLUtil MIME node
Returns:
String
Throws:
Exception

getReplacement

protected abstract String getReplacement(OwMainAppContext context_p,
                                         OwObjectReference obj_p,
                                         OwXMLUtil mimeNode_p)
                                  throws Exception
override with your replacement function

Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.