Author Message
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
I have a PDC that is available for both Speech and Call Control natures. When the nature is Call Control, I'd like to place an additional ccxml file in the ccxml/ folder. If the nature is Speech, I don't want the resource copied into the project. I'm familiar with the "item" element in the pluggableConnector, but I can't seem to choose when the file is copied and when it isn't.

Thanks,
Michael
Anonymous

You can check the nature of an IProject by the following:

project.hasNature(SpeechNature.NATURE) or
project.hasNature(CallControlNature.NATURE)

both the nature definitions come from com.avaya.sce.core
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
FYI... I was logged out at the time I posted the anonymous response.
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
Thanks Neil.

Where would I do this? Since the current process is automatic, I've never tried to control what resources are copied and what aren't, so I'm at a loss as to where to start.

Michael
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
You could do this in the configui.



<extension
point="com.avaya.sce.core.pluggableConnector">
<configuration
...
...
...

><configUI
class="MyConfigUI">
</configUI>
</configuration>


public class MyConfigUI extends PDCConfigUI {

protected void createConfigUIContents(Composite parent) {
}

public boolean canFinish(boolean checked) {
return(true);
}

public void performOk(boolean pdcEnabled) {
try {
if (pdcEnabled == true) {
/* copy file */
if ( getProject().hasNature(SpeechNature.NATURE) == true ) {
} else if ( getProject().hasNature(CallControlNature.NATURE) == true ) {
} else {
}
} else {
/* remove file */
if ( getProject().hasNature(SpeechNature.NATURE) == true ) {
} else if ( getProject().hasNature(CallControlNature.NATURE) == true ) {
} else {
}
}
} catch (Exception e) {
Log.log(e, Activator.PLUGIN_ID);
return;
}
}

}






NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
Sorry, redundant to Ross' answer.
Go to:   
Mobile view