Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.ide.compiler
Interface CopyListener

All Superinterfaces:
java.util.EventListener

public interface CopyListener
extends java.util.EventListener

CopyListener instances are objects created by BuildSystem/CopyTranslator clients and used by the BuildSystem CopyTranslator part as a callback mechanism to allow clients to copy the resource file themselves or change the output name/path, or prevent a particular file from being copied or ... A BuildSystem client would write a CopyListener implementation and plug it in the build system using JCompiler.addCopyListener(). The BuildSystem allows you to register one or more listener objects. The method handleCopy would be called as specified below. If more than one listener is registered, each listener would be called in the order the've been registered. The ordering is not customizable. Each listeners are called in sequential fashion until one of them handles the copy itself by returning true, others after that are not being called anymore. BuildSystem client may remove listener at anytime using the JCompiler.removeCopyListener() API.


Method Summary
 boolean handleCopy(java.net.URL srcURL, java.net.URL[] outputURL)
          This method is called just before actually copying from src to destination.
 void initialize(Project project)
          This method allows the listener implementation to initialize any data that will be used by every single call to handleCopy().
 void terminate()
          This method allows the listener implementation to cleanup any temporarty data created by initialize() and/or handleCopy().
 

Method Detail

initialize

void initialize(Project project)
This method allows the listener implementation to initialize any data that will be used by every single call to handleCopy(). The method is being called everytime the build system is being invoked just before copying the first element.

Parameters:
project - -- the project in context

terminate

void terminate()
This method allows the listener implementation to cleanup any temporarty data created by initialize() and/or handleCopy(). The method is being called everytime the build system is being invoked after copying all files.


handleCopy

boolean handleCopy(java.net.URL srcURL,
                   java.net.URL[] outputURL)
This method is called just before actually copying from src to destination. This method implementation may decide to handle the the copy by return true else it should return false if the caller should still go on and copy the file. This method implementation may also change the output URL name by filling in the output parameter. - input parameter -

Parameters:
srcURL - -- the element to copy from - output parameter -
outputURL - -- on input, this array contains one and only one element which is null, on output, if non null, the caller will use the specified URL and the destination element name.
Returns:
TRUE if the copy is being handled by this method implementation else FALSE and the caller should handle the copy with, optionally, copying the element to the specified outputURL

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.