Specific methods in JDAPI

I'm using Jdapi to get the component of a module(form,menu,libray).
My question is:
are thre any methods available in JDapi which allow us to know if the component belongs to a module and a libray at the same time?

I don't think so: this will tell you files that your module uses :
            String[] deps = Jdapi.getSubclassingDependencies((JdapiModule)mod);
            for (int x = 0; x < deps.length; x++) {
               out.write("<DependentFile Name=\"" + deps[x] + "\"></DependentFile>\n");
            }... you'd have to be more specific in the question for a better answer.
Steve

Similar Messages

  • Restrict access to a specific method in JSE

    Hello all,
    I'd like to know if there is a way to restrict access to a specific method in JSE. Basically, my intention is to do this:
    Subject.doAs(subject, new ProtectedMethod());
    // only users with a specific role can access this method
    // (permission specified in my policy file?)
    public class ProtectedMethod implements PrivilegedAction<String> {
       public String run() {
    }I believe that is not possible to specify a method name in policy file via java.lang.RuntimePermission "accessDeclaredMembers", so is there another way to do this?
    Thanks in advance,
    Andre

    I am not an expert of this media hub, but what I would like to know is that are you referring to the security you have setup with the original folders? So after you have created a backup, whatever type of access you have setup was removed? Can you please elaborate?
    Check the FAQ's for NMH305 from here: http://support.linksys.com/en-us/support/storage/NMH305

  • Homogeneous system copy ( sapinst or db specific method )

    I want to make homogeneous system copy ( NW7 ) of ECC6 from PRD to make a QA system on HPUX/Oracle environment. I am wondering which of the following method is better way to go
    System copy with the help of sapinst
    or
    Database specific method
    What are the steps of each method?
    Please help, your help will be highly appreciated.
    Best Regards,
    -Al

    Hi Al,
    Using sapinst is the supported method by SAP but it takes much longer as you'll need to export/import the data and doing this affects availability of your PRD system.  Most companies perform DB backup/restore as it is much quicker and does not require an outage of your PRD system (if you have online backups).  Different databases have different tools for this operations.  Since it only a QA system, I would suggest you do a DB backup/restore.
    Regards,
    Thomas Pham

  • Transaction timeout configuration for specific method

              Hi,
              How can i configure a transaction timeout for a specific method in EJB using a
              deployment descriptor (using weblogic 8.1)
              Amos.S
              

    There is another way but I think it's more complicated.
    After reading the file you can use a java code (java embedded activity) and split the file.
    For each part of the split you can PUT by FTP the file with append mode. That way your transaction will run in few cycles with less time.

  • Enums with constant-specific method implementation

    Just faced the following problem. I have a persistent class with one of the fields of it is enum with constant-specific method implementation:
    @Persistent
    public class Message
       static public enum Type
           DEFAULT
               @Override
               public String getDescription() { return "Some description"; }
           public abstract String getDescription();
       private Type type;
    }When I try to store the record, I get the exception:
    java.lang.IllegalArgumentException: Class could not be loaded or is not persistent: messages.Message$Type$1The problem seem to be in that compiler creates a separate class, namely Message$Type$1.class for the DEFAULT instance and this class is not known by BDB..
    If I remove the constant-specific method from enum, everything's working fine (as the ..$1.class is not created by compiler).. Except the fact that I'd like to have constant-specific methods there..
    Any ideas on this? Maybe it's a bad idea to create constant-specific methods if it means that each constant would get own class file (and they would bloat the storage routines)?

    Hi Mikhail,
    I recreated the problem here and you're right, constant-specific methods aren't working. This isn't something we thought about, to be honest, or tested.
    Just based on an initial quick look I see that for the compiler generated class, the Class.isEnum method returns false, which is why we don't recognize this as an enum and eventually why we throw the exception you're seeing. But assuming that we can identify the class as an enum (that shouldn't be too difficult) I don't know what other problems we will run into in trying to support this.
    For now I think the best thing is to avoid using the constant-specific methods. I have opened a ticket (#18357) so that we'll remember to look into this in more detail and see whether it can be supported in the future.
    If we are able to support it, then I'm hoping that we won't to store extra metadata for constants that have methods. In other words, I'm hoping that we won't have to add any extra storage or processing overhead.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Task hierarchy - period specific methods.

    Dear Experts,
    We have two data collection (flexi upload )methods one is specific to non quarter period & another is specific for Quarterly periods &  I want to assign period specific methods for a task. If this task is executed in non quarter months it need to pick non quarter flexi method Like for non quarter periods 1,2,4,5,7,8,10,11and for quarterly periods like 3,6,9,12 another method 
    Is there any possibility?
    Please advice.
    Thanks
    Kamal

    Hi,
    I agree with Gregoire.
    Some more information that can be helpful:
    1. Create period category gruop e.g. 10 - 'Months&Quarters'
    2. In this period category gruop create two period category e.g. 101 - 'Month other than quarter' and 102 - Quarter other than month'
    3. For period category 101 set checkboxes for periods 1,2,4,5,7,8,10,11 and for period category 102 periods 3,6,9,12
    4. Create one consolidation frequency, e.g. 500 - All months (for all period 1-12)
    5. Create one task and assign cons. frequency. Choose period category 101 and assign data collection method for this periods then choose period category 102 and assign data collection method for quarters.
    6. Save your changes
    It usually works without problems.
    I hope this helps.
    Pawel

  • Java Most Specific Method

    Considering the most specific method in overriden methods, could somebody explain as to what would be the output of the following program and why ?
    public class SuperClass {
         public void methodA()
              System.out.println("Name from Super One");
         public void methodA(String... str)
              System.out.println("Name from Super Two");
    public class BaseClass extends SuperClass {
         public void methodA(String str)
              System.out.println("Name from Derived");
         public static void main(String args[])
              SuperClass sc=new BaseClass();
              sc.methodA("str");
    Edited by: 839760 on Feb 24, 2011 11:23 PM

    Or get the real facts from [url http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12.1]the horse&apos;s mouth. But try Kayaman's idea first.
    Winston
    Edited by: YoungWinston on Feb 25, 2011 3:24 PM
    Actually, [url http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12.2.5]this section is, I think, a bit more specific to what you want to know.

  • Class casting & class specific methods

    I have an array of JComponents, over which I iterate. Depending on the type of component(JLabel || JTextField), I will do different methods on the components, from which some are component type specific. Can I somehow do class casting to allow doing certain methods? Perhaps my code will clarify...
    // My 4 JComponents
    JLabel l1 = new JLabel("jl2");
    JTextField f1 = new JTextField();
    JLabel l2 = new JLabel("jl2");
    JTextField f2 = new JTextField();
    // And put them in array
    JComponent[] jc = new JComponent[6];
    jc[0] = l1;
    jc[1] = f1;
    jc[2] = l2;
    jc[3] = f2;
    if(jc[0][0] instanceof JLabel)
         /* This is what i want to do, but method "setText" exists only for JLabel,
         *  so my compiler complains that method setText is not valid for JComponent
         *  and class casting by:
         *  (JLabel)jc[0][0].setText("MyText");
         * is a syntax error
         jc[0][0].setText("MyText");
    // While this works just fine...
    JLabel l = null;
    if(jc[0][0] instanceof JLabel)
         l = (JLabel)jc[0][0];
         l.setText( "Mytext" );
    }

    I don't think that's entirely correct...
    You created a named reference to the object in your array, and now you create an anonymous reference. Either way, the object referenced is the same...

  • How to call a specific method in a servlet from another servlet

    Hi peeps, this post is kinda linked to my other thread but more direct !!
    I need to call a method from another servlet and retrieve info/objects from that method and manipulate them in the originating servlet .... how can I do it ?
    Assume the originating servlet is called Control and the servlet/method I want to access is DAO/login.
    I can create an object of the DAO class, say newDAO, and access the login method by newDAO.login(username, password). Then how do I get the returned info from the DAO ??
    Can I use the RequestDispatcher to INCLUDE the call to the DAO class method "login" ???
    Cheers
    Kevin

    Thanks for the reply.
    So if I have a method in my DAO class called login() and I want to call it from my control servlet, what would the syntax be ?
    getrequestdispatcher.include(newDAO.login())
    where newDAO is an instance of the class DAO, would that be correct ?? I'd simply pass the request object as a parameter in the login method and to retrieve the results of login() the requestdispatcher.include method will return whatever I set as an attribute to the request object, do I have that right ?!!!!
    Kevin

  • How to assign the events in a specific method in class builder(se24)

    i have declared one event in event part.i want to asign the event to one method .can any one help me .i have to do it in se24.pls

    hi,
    create a class in se24.
    <b>click the <b>EVENTS</b> tab, define an event.</b>
    <b>click the <b>METHODS</b> tab, define a method to trigger/ raise the event</b>
    <b>define one more method as an event handler method for the event.</b>
    for a method to be an event handler, click on the detail view,
    select the check box <b>Event Handler for</b>  give the classname where the event is defined and the event name, click on Change button.
    <b>event can be in the same class or different from that of the event handler method.</b>
    don't forget to <b>register the event handler method in the program.</b>
    click the code button of ur trigger method(meth2 in my example) and write there,
    raise event evt1.
    now your class is ready.
    now in se38 program,
    declare a reference variable to ur class,
    create an object,set the handler for ur event,
    call the trigger method
    <b>data:oref type ref to zsowcl1.
    create object oref.
    set handler oref->meth1 for oref.  handler method
    call method oref->meth2.           raise evnt method</b>
    hope it gives  you clear idea,
    Regards,
    Message was edited by:
            sowjanya s

  • Automatically call specific method at other method invocation~ish?

    I have a class which basically acts as a wrapper around a List. It contains a List object and some methods that do something with that list.
    Now, in order to prevent exceptions, I've made a basic method that just checks if the List field is null and, if so, it will create a new ArrayList and chuck it in that field.
    Right now, I just have a call to that particular method in each other method that performs an operation on the list, like so:
    public class SomeClass<T> {
       private List<T> list;
       private void checkList() {
         if ( list == null) {
           list = new ArrayList<T>();
      public int method() {
        checkList();
        return list.doSomething();
      }Is there a way, prefferably a native Java way, to automatically have the checkList() method called before each and any method invocation? As in, whenever a method is called in the SomeClass, Java / the JVM automatically calls the checkList method?
    }

    Yop wrote:
    I have a class which basically acts as a wrapper around a List. It contains a List object and some methods that do something with that list.
    Now, in order to prevent exceptions, I've made a basic method that just checks if the List field is null and, if so, it will create a new ArrayList and chuck it in that field.
    Right now, I just have a call to that particular method in each other method that performs an operation on the list, like so:
    public class SomeClass<T> {
    private List<T> list;
    private void checkList() {
    if ( list == null) {
    list = new ArrayList<T>();
    public int method() {
    checkList();
    return list.doSomething();
    }Is there a way, prefferably a native Java way, to automatically have the checkList() method called before each and any method invocation? As in, whenever a method is called in the SomeClass, Java / the JVM automatically calls the checkList method?
    }Why not return the List<T> in the check() method? Like this:
    List<T> check() {
       if (list == null) list= new ArrayList<T>();
       return list;
    void otherMethod(T t) {
       check().add(t);
    }Instead of using variable 'list' directly, use the 'check()' method.
    kind regards,
    Jos

  • Use @see to link to specific method or constant

    I have
    package A, which class A1 that contain method1 and CONSTANT_A.
    package B, which class B1 that contain method2.
    In method2, I want to provide a specific link to method1 and constantA. I wrote
    @see A.A1.method1()
    @see A.A1.CONSTANT_A
    It didn't work. Is there a way to provide a specific link to a mehtod and constant? I saw the Java API does that.
    Thanks.

    have you tried
    @see A.A1#method1()
    @see A.A1#CONSTANT_A

  • Generating docs of specific methods only

    Folks i have two questions
    1. I have a project in which the directory structure is as follows
    src/mpi
    src/mpjdev
    src/runtime
    src/mpjbuf
    Now i want to generate the javadocs of src/mpi only. How can we do it? What if i want that i want to exlude some files from the src/mpi package. Please provide some snippets
    2. Now after generating the "selected" javadocs of src/mpi, i want to go one step further. There are many methods in the class of which i donot want the javadocs to be generated. Same applies for many fields. What can i do in the source files so that the javadocs of only those methods should get generated which i want and not of all the methods and fields....
    Can any one help?

    First off, I want to mention that the [Javadoc Tool Homepage|http://java.sun.com/j2se/javadoc/] is a very good place to read up on Javadoc features and configuration.
    KamranHameed wrote:
    Folks i have two questions
    1. I have a project in which the directory structure is as follows
    src/mpi
    src/mpjdev
    src/runtime
    src/mpjbuf
    Now i want to generate the javadocs of src/mpi only. How can we do it? What if i want that i want to exlude some files from the src/mpi package. Please provide some snippetsWell, basically javadoc supports explicitly specifying source files that should be documented. E.g. if there a three source filessrc/mpi/A.java
    src/mpi/B.java
    src/mpi/C.javaand you only want to document A and B you could invoke javadoc from the command line the following wayjavadoc -d doc/api src/mpi/A.java src/mpi/B.java(with -d doc/api specifying the destination of the generated documentation files). Of course, this approach is quite unwieldly as the number of files in a project grows. Fortunately, there are many build tools that provide a more convenient way to specify "filesets". E.g. ANT's Javadoc task supports an inclusion/exclusion mechanism for source files:<target name="javadoc-sample>
      <javadoc destdir="doc/api">
        <fileset dir="src" defaultexcludes="yes">
          <include name="mpi/**/*.java"/>
          <exclude name="**/C.java"/>
        </fileset>
      </javadoc>
    </target>For more information on ANT see [http://ant.apache.org/].
    {quote:title=KamranHameed wrote:}{quote}
    2. Now after generating the "selected" javadocs of src/mpi, i want to go one step further. There are many methods in the class of which i donot want the javadocs to be generated. Same applies for many fields. What can i do in the source files so that the javadocs of only those methods should get generated which i want and not of all the methods and fields....Javadoc supports filtering members by visibility using options -public, -protected, -package, -private (defaulting to -protected). For information on these options see [http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#javadocoptions]. If you need to filter members on some other criteria (e.g. never display methods whose name starts with "test" regardless of visibility), then you will have to use some other tool. yWorks' yDoc, for example, is a commercial Javadoc extension that allows users to exclude members from documentation by adding a special Javadoc tag to the corresponding documentation comment but also allows for sophisticated custom filtering.
    {quote:title=KamranHameed wrote:}{quote}
    Can any one help?Well, I hope I did that just now. ;-)

  • How to find out if a panel contains a specific component

    I am in a situation where i need to know whether a panel contains a specific component or not, like is there a specific method for that.
    To clarify, example :
    Suppose i have a panel
    JPanel p1;
    p1 = new JPanel();
    JLabel label = new JLabel("LABEL");
    p1.add(label);In this code i already know that p1 contains label, however at runtime, i would like to know if p1 contains label or not (assuming i removed the label at some point)

    verminator wrote:
    I thought that should have done the trick, and maybe it will, but did i do something wrong here :
    JPanel p1 = new JPanel();
    JLabel l1 = new JLabel("LABEL");
    p1.add(l1);
    if(isDescendingFrom(l1,p1))          //error here
    System.out.println("true");
    else
    System.out.println("false");
    }do you have to import some other package other than javax.swing.SwingUtilities for this method, because i'm getting an error "cannot find symbol" referring to the isDescendingFrom() methodSwingUtilities isn't a package, it's a class. isDescendingFrom() is a static method in that class.
    To call isDescendingFrom(), it should look like this:
    SwingUtilities.isDescendingFrom(c1, c2);

  • Setting Adapter-Specific Message Attributes in an Adapter Module

    Hi!
    I want to set Adapter-Specific Message Attributes in an Adapter Module. Is it possible to configure the Variable Transport Binding in this way?
    Best regards,
    Daniel

    I'd like to know it as well.
    I've checked out the XI AF API but didn't find much.
    One thing that I've observed is that since Module API can treat any Message Class (not only XI Messages), I guess it won't have any specific methods for XI messages (hence, no dynamic configuration). But you could try to get the message object and then treat it as an XI Message (you would be doing the steps that the Java Mapping API do before it calls a Java Mapping class) to get the Map objects (which include the parameters).
    Good luck on it, and let us know if you have any progress!
    Regards,
    Henrique.

Maybe you are looking for