05-18-2012 05:52 AM - edited 03-14-2019 09:53 AM
Where can I find the package
com.audium.server.action.database.DatabaseAction;
since its not part of the Framework jar. This is for CVP 8.5
Thanks.
05-18-2012 06:20 AM
Probably in elements.jar
C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.elements.core_8.5.1\lib
Yep
jar xvf C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.elements.core_8.5.1\lib\elements.jar
inflated: com/audium/server/action/database/DatabaseAction.class
Regards,
Geoff
05-18-2012 06:49 AM
hmmm I imported that one and the package is empty
com.audium.server.action.database
com.audium.server.voiceElement.audio
com.audium.server.voiceElement.currency
com.audium.server.voiceElement.date
com.audium.server.voiceElement.digit
com.audium.server.voiceElement.form
com.audium.server.voiceElement.menu
com.audium.server.voiceElement.number
com.audium.server.voiceElement.phone
com.audium.server.voiceElement.record
com.audium.server.voiceElement.time
com.audium.server.voiceElement.transfer
05-18-2012 08:13 AM
Sorry, I don't know what you mean by "the package is empty". Actually, I don't know what you mean by "I imported that one" either.
The JAR file should be
Directory of C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.elements.core_8.5.1\lib
12/11/2010 11:57 AM 192,454 elements.jar
And "jar tvf" will show what is in the JAR
C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.elements.core_8.5.1\lib>"\Program Files (x86)\Java\jdk1.5.0_09\bin"\jar tvf elements.jar
0 Sat Dec 11 13:04:40 GMT 2010 META-INF/
197 Sat Dec 11 13:04:38 GMT 2010 META-INF/MANIFEST.MF
0 Sat Dec 11 13:04:40 GMT 2010 com/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/action/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/action/context/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/action/counter/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/action/database/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/action/email/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/action/math/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/audio/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/currency/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/date/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/digit/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/form/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/menu/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/number/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/phone/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/record/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/time/
0 Sat Dec 11 13:04:40 GMT 2010 com/audium/server/voiceElement/transfer/
3424 Sat Dec 11 13:03:56 GMT 2010 com/audium/server/action/context/ApplicationModifier.class
4755 Sat Dec 11 13:03:56 GMT 2010 com/audium/server/action/counter/CounterAction.class
8735 Sat Dec 11 13:03:56 GMT 2010 com/audium/server/action/database/DatabaseAction.class
2289 Sat Dec 11 13:03:56 GMT 2010 com/audium/server/action/database/ResultSetList.class
2904 Sat Dec 11 13:03:56 GMT 2010 com/audium/server/action/email/EmailAction.class
9220 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/action/email/EmailActionUtil.class
810 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/action/math/MathAction$JEPParserResultHolder.class
7028 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/action/math/MathAction.class
15363 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/MBasicElement.class
12730 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/MiscVoiceElementUtil.class
5301 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/audio/MAudio.class
15235 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/currency/MBasicCurrency.class
22470 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/currency/MBasicCurrencyWithConfirm.class
32269 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/date/DateVoiceElementUtil.class
6525 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/date/MBasicDate.class
8856 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/date/MBasicDateWithConfirm.class
15340 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/digit/MBasicDigit.class
22594 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/digit/MBasicDigitWithConfirm.class
27900 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/form/MFoundationForm.class
35269 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/form/MFoundationFormWithConfirm.class
494 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MFoundation10OptionMenu.class
490 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MFoundation2OptionMenu.class
490 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MFoundation3OptionMenu.class
490 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MFoundation4OptionMenu.class
490 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MFoundation5OptionMenu.class
491 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MFoundation6OptionMenu.class
491 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MFoundation7OptionMenu.class
491 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MFoundation8OptionMenu.class
491 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MFoundation9OptionMenu.class
17710 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MFoundationMenu.class
13319 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/menu/MYesNoMenu.class
15234 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/number/MBasicNumber.class
22167 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/number/MBasicNumberWithConfirm.class
6592 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/phone/MBasicPhone.class
8989 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/phone/MBasicPhoneWithConfirm.class
2063 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/record/FTPBackgrounder.class
19096 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/record/MRecord.class
30554 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/record/MRecordWithConfirm.class
2121 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/record/PathValidator.class
6539 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/time/MBasicTime.class
8922 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/time/MBasicTimeWithConfirm.class
15219 Sat Dec 11 13:03:58 GMT 2010 com/audium/server/voiceElement/transfer/MTransfer.class
Regards,
Geoff
05-21-2012 06:52 AM
Thank you., The issue was the way the jar file got imported. Now when trying to get session data using
actionData.getSessionData("oncalldata"); I get that actionData can not be resolved. Thanks.
05-21-2012 08:12 AM
Can you post your code? What are you building?
Regards,
Geoff
05-21-2012 08:32 AM
Hi, I am trying to process a multiple database request need to read that database and put the info into variables, here is the initial of part of my class..
import com.audium.server.action.database.* ;
import com.audium.server.session.ComponentAPI;
import com.audium.server.voiceElement.ElementInterface;
import com.audium.server.session.*;
import java.util.*;
import com.audium.server.voiceElement.ActionElementBase;
import com.audium.server.voiceElement.Setting;
import com.audium.server.voiceElement.ElementData;
import com.audium.server.voiceElement.ElementException;
import com.audium.server.xml.ActionElementConfig;
import com.audium.server.AudiumException;
public class OnCall extends ActionElementBase implements ElementInterface
{
/**
* @param args
*/
public static void main(String[] args) {
Object obj = null;
obj=actionData.getSessionData("oncalldata");
OnCallList = (ResultSetList) obj;
}
05-21-2012 08:38 AM
You can't do it that way.
Here is the old Audium template for a "configurable action class"
//These classes are used by custom configurable elements.
import com.audium.server.voiceElement.ActionElementBase;
import com.audium.server.voiceElement.ElementInterface;
import com.audium.server.voiceElement.Setting;
import com.audium.server.voiceElement.ElementData;
import com.audium.server.voiceElement.ElementException;
// This class is used by action elements.
import com.audium.server.session.ActionElementData;
/**
* This is the skeleton of a configurable action element. This is different
* from a standard action in that it is pre-built and the developer
* configures it in Audium Builder for Studio. The methods implemented here
* apply primarily to define the configuration for display in the Builder. Note
* that there is no need to implement the methods getExitStates because action
* elements only have a single exit state: "done".
*/
public class MyConfigurableAction extends ActionElementBase implements ElementInterface
{
/**
* This method is run when the action is visited. From the ActionElementData
* object, the configuration can be obtained.
*/
public void doAction(String name, ActionElementData data) throws ElementException
{
// PUT YOUR CODE HERE.
}
/**
* This method returns the name the action element will have in the Element
* Pane in the Audium Builder for Studio.
*/
public String getElementName()
{
// PUT YOUR CODE HERE.
return "My action element";
}
/**
* This method returns the name of the folder in which this action element
* resides. Return null if it is to appear directly under the Elements
* folder.
*/
public String getDisplayFolderName()
{
// PUT YOUR CODE HERE.
return "My action element folder";
}
/**
* This method returns the text of a description of the action element that
* will appear as a popup when the cursor points to the element.
*/
public String getDescription()
{
// PUT YOUR CODE HERE.
return "My action element description";
}
/**
* This method returns an array of Setting objects representing all the
* settings this action element expects. Return null if the action element
* does not need any settings.
*/
public Setting[] getSettings() throws ElementException
{
// PUT YOUR CODE HERE.
return null;
}
/**
* This method returns an array of ElementData objects representing the
* element data that this action element creates. Return null if the action
* element does not create any Element Data.
*/
public ElementData[] getElementData() throws ElementException
{
// PUT YOUR CODE HERE.
return null;
}
}
Regards,
Geoff
05-22-2012 02:23 PM
Ok , I got the skeleton, and started working on it, Please be patient, I am new on this. still have the issue with getting the session data to work, it cant resolve the actionData.getSessionData("OnCallData")
//These classes are used by custom configurable elements.
import com.audium.server.voiceElement.ActionElementBase;
import com.audium.server.voiceElement.ElementInterface;
import com.audium.server.voiceElement.Setting;
import com.audium.server.voiceElement.ElementData;
import com.audium.server.voiceElement.ElementException;
import com.audium.server.action.database.*;
// This class is used by action elements.
import com.audium.server.session.ActionAPI;
import com.audium.server.session.ActionElementData;
/**
* This is the skeleton of a configurable action element. This is different
* from a standard action in that it is pre-built and the developer
* configures it in Audium Builder for Studio. The methods implemented here
* apply primarily to define the configuration for display in the Builder. Note
* that there is no need to implement the methods getExitStates because action
* elements only have a single exit state: "done".
*/
public class OnCallData extends ActionElementBase implements ElementInterface
{
/**
* This method is run when the action is visited. From the ActionElementData
* object, the configuration can be obtained.
*/
public void doAction(String name, ActionElementData data) throws ElementException
{
Object obj = null; //
ResultSetList OnCallDB = null; // we will pull this off the session structure
obj = actionData.getSessionData("OnCallData"); // like so // like so
//
// Now cast the object to the right type
//
OnCallDB = (ResultSetList) obj;
// PUT YOUR CODE HERE.
}
/**
* This method returns the name the action element will have in the Element
* Pane in the Audium Builder for Studio.
*/
public String getElementName()
{
// PUT YOUR CODE HERE.
return "On Call";
}
/**
* This method returns the name of the folder in which this action element
* resides. Return null if it is to appear directly under the Elements
* folder.
*/
public String getDisplayFolderName()
{
// PUT YOUR CODE HERE.
return "ON Call Folder";
}
/**
* This method returns the text of a description of the action element that
* will appear as a popup when the cursor points to the element.
*/
public String getDescription()
{
// PUT YOUR CODE HERE.
return "Gets ONCall Data";
}
/**
* This method returns an array of Setting objects representing all the
* settings this action element expects. Return null if the action element
* does not need any settings.
*/
public Setting[] getSettings() throws ElementException
{
// PUT YOUR CODE HERE.
return null;
}
/**
* This method returns an array of ElementData objects representing the
* element data that this action element creates. Return null if the action
* element does not create any Element Data.
*/
public ElementData[] getElementData() throws ElementException
{
// PUT YOUR CODE HERE.
return null;
}
}
05-22-2012 03:55 PM
Ok, I understand your problem.
Object obj = null; //
ResultSetList OnCallDB = null; // we will pull this off the session structure
obj = actionData.getSessionData("OnCallData"); // like so // like so
//
// Now cast the object to the right type
//
OnCallDB = (ResultSetList) obj;
I imagine you have made a DB query using the standard Database Element and have set it to multi-line, and it's returning a SET of results. And Cisco provide no way of digging these out of the built-in element, and you want to process them. Am I on the right track?
I have done this and I assume that the multiline Database Element is set to use "OnCallData" for the results. You have your import statement on the database element to define the type ResultSetList. Your code is perfectly reasonable - this would be my code.
Object obj = null;
ResultSetList rsl = null;
obj = actionData.getSessionData("OnCallData");
if (obj != null) // I know what the doc says, but I'm paranoid
{
actionData.addToLog("OnCallData", "getSessionData is not null - cast to ResultSetList");
rsl = (ResultSetList) obj;
}
else
{
actionData.addToLog("OnCallData", "getSessionData returned null");
}
You are all set up. It's not working you say? Maybe add a couple of logging statements. It should work.
Regards,
Geoff
05-22-2012 05:09 PM
Yes that's exactly what I want to do. now the problem here is that can not be resolved, seems like it does not find class
actionData
obj = actionData.getSessionData("OnCallData");
actionData.addToLog("OnCallData", "getSessionData is not null - cast to ResultSetList");
actionData.addToLog("OnCallData", "getSessionData returned null");
Thanks.
05-22-2012 06:07 PM
If it's an action element, it calls the main method doAction() and it's passed the ActionElementData. Oh, I see - you've made a silly error. Should be passing the right variable - call it actionData in the method call:
public void doAction(String name, ActionElementData actionData) throws ElementException
{
Object obj = null; //
ResultSetList OnCallDB = null; // we will pull this off the session structure
obj = actionData.getSessionData("OnCallData"); // like so // like so
//
// Now cast the object to the right type
//
OnCallDB = (ResultSetList) obj;
// PUT YOUR CODE HERE.
}
Regards,
Geoff
(PS - Java naming conventions. Start your variable with a lower case letter - so "onCallDB" would be better)
05-23-2012 05:39 AM
Good eyes..yes that did it thank you very much...until my next issue..so long...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide