How to get a handle of tcUtilityFactory within Java Task

Hi
I am trying to user op interface within a java task and want to avoid the GUI based coding in adapter factory
I am having doubt about how to get a handle of tcUtilityFactory
the standalone example of getting the handle works fine within a Java task
// ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
// final Hashtable env = config.getAllSettings();
// ioUtilityFactory = new tcUtilityFactory(env, "xelsysadm", "welcome1");
but I want the handle to be provided by adapter runtime env
there is a function call within generated adapter code
APITaskLocal.getUtilityFactory(getDataBase());
but I get null pointer if I try to use it within custom code
has anyone played around with APITaskLocal.getUtilityFactory

Hi,
Use this code.
public void init(tcDataProvider dataProvider) {
try {
     usrOps = (tcUserOperationsIntf)tcUtilityFactory.getUtility(dataProvider, "Thor.API.Operations.tcUserOperationsIntf");
} catch(Exception e) {
log.error("Unable to initialize: "+e);
You can pass dataProvider in adapter mapping . Map it to Adapter reference->Database reference.
Hope this will help.
Regards
Nitesh

Similar Messages

  • How does Media Manager handle Motion Projects within the Sequence being cop

    How does Media Manager handle Motion Projects within the Sequence being copied?
    I've highlighted my sequence, opened Media Manager, and copied it to another drive. When I open up the sequence in it's new project, the rendered Motion Project plays within my sequence but it won't let me go back into this Motion Project to make changes. I tried starting over. This time I highlighted the actual motion sequence and clip that is created within FCP after sending something to Motion and copied those to the new drive. When I went into the newly created 'media' folder and double clicked on the motion project it launched. It looked liked it was going to play but while my crops moves and borders were there, the filmed material is shown as a freeze frame for the duration of the motion project.
    I did this with and without 'including master clips within selection'. Any advice would be appreciated. Thanks.

    Is there anyone who knows the answer to this? Thanks.

  • How to get the handle of the Validation Failure Message Popups.

    Hi,
    I'm using Jdev 11.1.2.0
    I have added validation rule(less than system date) and failuremessage("date should not after currentdate") on the date field in EO.
    when I enter greated than the sysdate in date field in page, I'm getting validation failure message in a popup with ok button. its working good.
    but when i click on the popup ok button, the focus should go the date field again and it is higlighted.
    So, how to get the handle of the popup's ok buton? and how to highlight the datefield after clicking the popup's ok button?
    Any suggestion would be appreciated.
    thank you.

    if i understood correclty means,
    i hope that, error popup is provided by framework.. how could be possible? to catch the error popup ok button.
    am not well aware of catching the error popup which is provide by framework..
    but i had answer for your part of the question,
    if the condition go off false means you force the cursor into date field. this is can be done using 'javascript'. unless using script you can't do that. ADF doesnt provide any force focusing feature.
    please google how to focus the field.
    https://blogs.oracle.com/jdevotnharvest/entry/how_to_programmatically_set_focus
    http://technology.amis.nl/2008/01/04/adf-11g-rich-faces-focus-on-field-after-button-press-or-ppr-including-javascript-in-ppr-response-and-clientlisteners-client-side-programming-in-adf-faces-rich-client-components-part-2/
    http://lspatil25.blogspot.in/2012/04/adf-default-cursorfocus-to-input-field.html
    http://donatas.nicequestion.com/2012/04/component-to-set-initial-focus-in-adf.html

  • In OBIEE 11G, how to get the special parameter created by JAVA?

    Hi Experts,
    In OBIEE 11G, how to get the special parameter created by JAVA?
    For example:
    In JAVA , it has set one parameter named 'test'.
    So how to get the parameter in filter area in OBIEE?

    Hi Kobe,
    No P2 holds the parameter name like PresentationTable.ColumnName, in your form you may go for complete name or just column name and before submitting the form you can define the Action url.
    I would suggest to read section 6.3.2.1.
    ex:
    <SCRIPT LANGUAGE="JavaScript">
    changeAction(url) {
    var TestVar = form.inputbox.value;
    document.this_form.action="saw.dll?Go&Path=/Shared/Test/SB2&Action=Navigate&P0=1&P1=like&P2=Customers.Region&P3="+TestVar;
    </SCRIPT>
    </HEAD>
    <BODY>
    <FORM NAME="myform" ACTION="" METHOD="GET">Enter something in the box: <BR>
    <INPUT TYPE="text" NAME="inputbox" VALUE=""><P>
    <INPUT TYPE="button" NAME="button" Value="Click" onClick="changeAction(this.value)">
    </FORM>
    If helps pls mark.
    Edited by: veeravalli on Oct 24, 2012 10:25 AM

  • How to get the current GMT time in java

    Hi,
    How to get the current GMT time in java
    Thanks

    System.getCurrentTimeMillis() or new Date().
    [url http://www.javaworld.com/jw-12-2000/jw-1229-dates.html]Calculating Java dates: Take the time to learn how to create and use dates
    [url http://www.javaalmanac.com/egs/java.text/FormatDate.html]Formatting a Date Using a Custom Format

  • How to get the current function name in java

    How to get the current function name in java.
    In c it is done as
    printf("%s",__func__);
    Thanx in advance.

    j0o wrote:
    System.out.println("Class Name: " + new Exception().getStackTrace()[0].getClassName() +
    "/n Method Name : " + new Exception().getStackTrace()[0].getMethodName() +
    "/n Line number : " + new Exception().getStackTrace()[0].getLineNumber());
    I pointed the OP at this approach yesterday in one of his multi-posts. I still have not been given my Dukes!

  • How to  get the profile object in simple java class  (Property accessor)

    Hi All,
    Please guide me how to get the profile object in simple java class (Property accessor) which is extending the RepositoryPropertyDescriptor.
    I have one requirement where i need the profile object i.e i have store id which is tied to profile .so i need the profile object in the property accessor of the SKU item descriptor property, which is extending RepositoryPropertyDescriptor.
    a.I dont have request object also to do request.resolvename.
    b.It is not a component to create setter and getter.It is simple java class which is extending the RepositoryPropertyDescriptor.
    Advance Thanks.

    Iam afraid you might run into synchronization issues with it. You are trying to get/set value of property of a sku repository item that is shared across various profiles.
    Say one profile A called setPropertyValue("propertyName", value).Now another profile B accesses
    getPropertyValue() {
    super.getPropertyValue() // Chance of getting value set by Profile A.
    // Perform logic
    There is a chance that profile B getting the value set by Profile A and hence inconsistency.
    How about doing this way??
    Create PropertyDescriptor in Profile (i.e user item descriptor), pass the attribute CustomCatalogTools in userProfile.xml to that property.
    <attribute name="catalogTools" value="atg.commerce.catalog.CustomCatalogTools"/>
    getPropertyValue()
    //You have Profile item descriptor and also storeId property value.
    // Use CustomCatalogTools.findSku();
    // Use storeId, profile repository item, sku repository item to perform the logic
    Here user itemdescriptor getPropertyValue/setPropertyValue is always called by same profile and there is consistency.
    -karthik

  • How to get a handle which is used in c dll from  javax.smartcardio.card

    good afternoon
    i am using javax.smartcardio.card to operate a sim-card reader .
    but i have a dll which is call sim-card reader by handle.
    how can i get a handle from a javax.smartcardio.card object to pass to the dll
    next is the code .
    c dll prototype declaration
    char DoFormat([in] unsigned long P1�C[in] char * P2�C[in] bool P3,[in][out] char *P4)P1 is a handle
    java code:
    private boolean checkCardReader(boolean isopen)
    boolean r=false;
    try {
    javax.smartcardio.card card;
    TerminalFactory factory = TerminalFactory.getDefault();
    List terminalList = factory.terminals().list();
    terminal = (CardTerminal) terminalList.get(0);
    // establish a connection with the card
    card = terminal.connect("T=0");
    channel = card.getBasicChannel();
    //how can i get a handle which can be used by windows dll .
    }catch (Exception ex)
    System.out.println("Exception : " + ex);
    return r;
    *****************************************************************

    Presumably you are calling a C library method that returns a handle.
    Normally a handle will be a integer type value.
    With such a value you can cast it into a java integer type and then cast it back in different JNI code by passing it to those routines.
    A java long is as big as you can get and will hold most every normal type handle item. You should however verify sizes.

  • How to get a handle Logged in As message in Apps Home page

    Hi,
    I want to get the handle to Logged in As meesage in Apps homepage ,when i pressed personalize link. As i want to change this custom message, by some other message,for that i should be able to see the text in the personalize link because i want to attach a custom controller to that.Here i also want to add that am able to see that message in about this page link, it is inside a flow layout, but am not able to see it inside the personalize link.
    Please help me in this issue.
    Thanks

    This issue alredy discuss on this forum
    Re: How to change the oracle's home page to show our custom message.
    Let us know if this is not able solve your customization.

  • How to get the handle of AM in custom co

    Hi All,
    I am extending a controller in that controller if I use the code
    OAApplicationModule am1 = pageContext.getApplicationModule(webBean);
    I will get the handle of the am which is attached to the region.
    But i want to get the handle of an AM which exists out side of the region i had imported the AMImpl
    and now please let know how can i get the handle of this AM in my extended CO(custom CO)
    Please reply with a piece of code.
    Thanks
    Ajay

    it gives the Root AM
    but i want to handle the Application module of an lov.
    I was trying with
    CsfPoLovAMImpl lotam =(CsfPoLovAMImpl)pageContext.getApplicationModule(webBean);
    But it is giving an class Cast exception as
    java.lang.ClassCastException: oracle.apps.csf.portal.task.server.CsfDebriefAMImpl
    at CsfPoLovAMImpl lotam =(CsfPoLovAMImpl)pageContext.getApplicationModule(webBean);
    Thanks
    Ajay

  • JMAPI - How to get a handle on a Remote JRockit JVM

    Using the JVMFactory.getJVM() returns the handle to the current instance of the
    JVM in which this code executes.
    How do i get a handle to a remote JVM executing on a different host? I.E i am
    looking for the API that the Jrockit Console uses to connect to the Management
    server on a remote JRockit JVM.

    There is no such API. The JRockit console has two parts - one resides in
    the JVM you are managing and get the data from JRockit, the data is then
    sent over the wire to the the other part (the console itself). The wire
    protocol in this case is proprietary, but you could implement something
    like it yourself.
    Regards,
    /Staffan
    Code Warrior wrote:
    Using the JVMFactory.getJVM() returns the handle to the current instance of the
    JVM in which this code executes.
    How do i get a handle to a remote JVM executing on a different host? I.E i am
    looking for the API that the Jrockit Console uses to connect to the Management
    server on a remote JRockit JVM.

  • SQL query - how to get parameters into a function within a SELECT statement

    Hi,
    I have SQL query roughly as follows
    SELECT A, B, C, MAX(CASE...) AS "D_NAME", FunctionX(B, C, "D_NAME")
    FROM...
    WHERE...
    How to get alias "D_NAME" as a valid parameter into FunctionX?

    Hi,
    user8819407 wrote:
    Hi,
    I have SQL query roughly as follows
    SELECT A, B, C, MAX(CASE...) AS "D_NAME", FunctionX(B, C, "D_NAME")
    FROM...
    WHERE...
    How to get alias "D_NAME" as a valid parameter into FunctionX?Either
    (1) repeat the calculation or
    (2) compute it in a sub-query
    Here's an example of (2)
    WITH  got_d_name  AS
        SELECT A, B, C, MAX(CASE...) AS "D_NAME"
        FROM...
        WHERE...
    SELECT  A, B, C, D_NAME, FunctionX (B, C, D_NAME)
    FROM    got_d_name
    ;A column alias (like d_name) can be referenced in the ORDER BY clause of the query where it was defined, but that's the only place in that query where it can be referenced.

  • How to get current file position information in JAVA ?

    Hello,
    I would like to know if someone knows how to get and set current file position information in JAVA ?
    In C I use fgetpos and fsetpos.
    Thanks

    Instead of using a standard java.io.File, use java.io.RandomAccessFile
    This is a great class - you can get the file pointer (getFilePointer()), and set it (seek(long pos) )
    that will do all you need I presume - works the same a file handle in C.
    james

  • How to get an XML string from a Java Bean without wrting to a file first ?

    I know we can save a Java Bean to an XML file with XMLEncoder and then read it back with XMLDecoder.
    But how can I get an XML string of a Java Bean without writing to a file first ?
    For instance :
    My_Class A_Class = new My_Class("a",1,2,"Z", ...);
    String XML_String_Of_The_Class = an XML representation of A_Class ?
    Of course I can save it to a file with XMLEncoder, and read it in using XMLDecoder, then delete the file, I wonder if it is possible to skip all that and get the XML string directly ?
    Frank

    I think so too, but I am trying to send the object to a servlet as shown below, since I don't know how to send an object to a servlet, I can only turn it into a string and reconstruct it back to an object on the server side after receiving it :
    import java.io.*;
    import java.net.*;
    import java.util.*;
    class Servlet_Message        // Send a message to an HTTP servlet. The protocol is a GET or POST request with a URLEncoded string holding the arguments sent as name=value pairs.
      public static int GET=0;
      public static int POST=1;
      private URL servlet;
      // the URL of the servlet to send messages to
      public Servlet_Message(URL servlet) { this.servlet=servlet; }
      public String sendMessage(Properties args) throws IOException { return sendMessage(args,POST); }
      // Send the request. Return the input stream with the response if the request succeeds.
      // @param args the arguments to send to the servlet
      // @param method GET or POST
      // @exception IOException if error sending request
      // @return the response from the servlet to this message
      public String sendMessage(Properties args,int method) throws IOException
        String Input_Line;
        StringBuffer Result_Buf=new StringBuffer();
        // Set this up any way you want -- POST can be used for all calls, but request headers
        // cannot be set in JDK 1.0.2 so the query string still must be used to pass arguments.
        if (method==GET)
          URL url=new URL(servlet.toExternalForm()+"?"+toEncodedString(args));
          BufferedReader in=new BufferedReader(new InputStreamReader(url.openStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
        else     
          URLConnection conn=servlet.openConnection();
          conn.setDoInput(true);
          conn.setDoOutput(true);           
          conn.setUseCaches(false);
          // Work around a Netscape bug
          conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
          // POST the request data (html form encoded)
          DataOutputStream out=new DataOutputStream(conn.getOutputStream());
          if (args!=null && args.size()>0)
            out.writeBytes(toEncodedString(args));
    //        System.out.println("ServletMessage args: "+args);
    //        System.out.println("ServletMessage toEncString args: "+toEncodedString(args));     
          BufferedReader in=new BufferedReader(new InputStreamReader(conn.getInputStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
          out.flush();
          out.close(); // ESSENTIAL for this to work!          
        return Result_Buf.toString();               // Read the POST response data   
      // Encode the arguments in the property set as a URL-encoded string. Multiple name=value pairs are separated by ampersands.
      // @return the URLEncoded string with name=value pairs
      public String toEncodedString(Properties args)
        StringBuffer sb=new StringBuffer();
        if (args!=null)
          String sep="";
          Enumeration names=args.propertyNames();
          while (names.hasMoreElements())
            String name=(String)names.nextElement();
            try { sb.append(sep+URLEncoder.encode(name,"UTF-8")+"="+URLEncoder.encode(args.getProperty(name),"UTF-8")); }
    //        try { sb.append(sep+URLEncoder.encode(name,"UTF-16")+"="+URLEncoder.encode(args.getProperty(name),"UTF-16")); }
            catch (UnsupportedEncodingException e) { System.out.println(e); }
            sep="&";
        return sb.toString();
    }As shown above the servlet need to encode a string.
    Now my question becomes :
    <1> Is it possible to send an object to a servlet, if so how ? And at the receiving end how to get it back to an object ?
    <2> If it can't be done, how can I be sure to encode the string in the right format to send it over to the servlet ?
    Frank

  • How to get the Current Date in webdynpro java

    Hi Experts,
                 In my project i have two date input fields called
                        1)Start Date
                      2)End Date   
    and one Absence type input field is there. The user wants to set the start Date ,End date and absence type.
    How to get the user set values in my project.i.e how to get the user inputs and the started date must be current date of the system and end date must be after the 3 months.
    Can any body send code regarding this.
    Thanks in advance.
    Regards,
    Venkat.
    Edited by: Venkat5939 on Jan 11, 2011 4:46 PM

    Hello Venkat,
    Current Date:
    Date date = new Date(System.currentTimeMillis());
    For getting the date after three months refer the following threads:
    Set date in a date field
    Date Function
    date format
    Hope it helps.
    Regards
    Nizamudeen SM

Maybe you are looking for

  • Creating an image of an xib(interface builder)

    Hi all, Actually i wanted to create an image of a xib file by the clicking  the button present in xib file within the application. The generated image to be stored some where safely(i.e documents folder). Waiting for the response. Thanks in Advance.

  • Sap sd-third party sales

    when the order is rised for third party material (HAWA) the system is saying consumption account canot be determined tell me the solution to rectify it soon

  • BADI for F150 Transaction

    Hello evrybody, For T-code ' f150 ' package is FIBP. My requirement is to make some changes in dunning , but i couldn't fina any BADI's or enhancements for that transaction, there is a userexit but it is not helpful to me. So is there any other optio

  • Any way to avoid having the Pre lock when on the Touchstone?

    Moved to webOS Hardware. I am a Volunteer here, not employed by HP. You too can become an HP Expert! Details HERE! If my post has helped you, click the Kudos Thumbs up! If it solved your issue, Click the "Accept as Solution" button so others can bene

  • Why can't I purchase diamonds in game Japanlife?

    Every time I try to purchase diamonds in game Japanlife,show up a window tells me to contact the itunes staffs,I don't know why.