Need to get IRole object using Roles Display Name

Hi,
I need to get IRole object using Roles Display Name. I had the below code in EP 2004 SP12 and it works. But the same code dont work in EP 2004s SP13
user = request.getUser();
profile = request.getComponentContext().getProfile();     
String strRoles = profile.getProperty("Roles");
String strRole[] = strRoles.split(",");
IRoleFactory roleFactory = UMFactory.getRoleFactory();
String roleUniqueId = null;
int i = 0;
boolean flagRedirect = false;
for(i = 0; i < strRole.length; i++){
     try
          com.sap.security.api.IRole role = roleFactory.getRoleByUniqueName(strRole<i>);
          roleUniqueId = role.getUniqueID();
          if(!user.isMemberOfRole(roleUniqueId, true))
               continue;
          flagRedirect = true;                    
          break;
     catch(UMException ex)
     catch(IOException ex)
if(!flagRedirect){
Where property Roles will have comma separated roles display names like "com.ABC.ortho_reports,com.ABC.lawns_ortho_reports,com.ABC.executive_reports"
Please advise.

Thanks Mrudula for the response. Sorry for the delay in responding.
I get UMEException with the message "Role with uniqueName com.ABC.general not found"
But it works fine if i specify Role unique role (like pcd:portal_content/com.abc.Marketing_Workbench/com.abc.Roles/com.abc.general).
We are in the process of upgrading Portal environment from EP6.0 SP12 to EP7.0 SP13. Above scenario works fine in the older environment.

Similar Messages

  • Using alternative display names on one email alias

    Sometimes I'd like send email using one display name (ie "Mr. Happy") and sometimes with another ("Mr. and Mrs. Very Happy"), both using the same email account. Is there a way to set that up without creating a duplicate account? Thought I'd seen a reference, but can't find it now...

    Thank you. This is great help-it's got me looking in the right direction.
    I have not been managing aliases, so I'm wondering how to load the db and edit it. This is my first mail server and my first email setup for osx so I'm a newbie.
    I've found the following resources:
    http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/postalia s.1.html
    and
    http://developer.apple.com/documentation/Darwin/Reference/Manpages/man5/aliases. 5.html#//apple_ref/doc/man/5/aliases
    But I'm a little lost as to how to edit the configuration file, and I'm a bit lost on where it is. I've found a file titled "aliases.db" within the /etc folder that I have opened with a text editor. It lists some of the email addresses in my company, but there's also some garbled information in it. So I believe this is the file I would need to edit, but I'm not sure.
    Can you please give me a little more help as to how to edit this file and reload it? I really appreciate it.
    -John

  • Using Lov display name but save id

    problem: using Lov display name but save id

    solution: put the LOV on the name and use formValue item for the ID with the viewInstance and viewAttribute, and make a mapping for the form value

  • Get all object using RandomAccessFile

    hi friends,
    i have one log file and this log file contain some object. and i am used Serializable Interface.
    i know basically object are not readable format, but consider log file(logInfo.log) contain some object like:
    12 javasun
    20 sunjava
    38 java
    96 sun
    like wise
    am using RandomAccessFile class and this my
    raf.writeInt(baos.size());
    raf.write(baos.toByteArray());
    raf.seek(0);
    int a = 0;
    while(true)
    a = raf.readInt();
    System.out.println("The pointer Value : " + a);
    byte[] b = new byte[a+4];
    int x=(int)raf.getFilePointer();
    System.out.println("file Pointer : " + x);
    raf.read(b,x,a);
    ByteArrayInputStream bais = new ByteArrayInputStream(b,x,a);
    ObjectInputStream ois = new ObjectInputStream(bais);
    Record rec = (Record)ois.readObject(); //here record is object
    System.out.println("The object : "+rec.getAttributes());
    using this code i got below result
    12 javasun
    but i can't get all object from the file(logInfo.log)
    how can i get all object? help me!!!...
    Thank You

    ok, sir
    i tried and i got all object from the file. Thank
    you,
    and,
    if i need last two object from file(logInfo.log)
    like
    38 java
    96 sun
    how can i get? please give some clue or code
    Thank youSince you don't have a set size for the objects, then you will have to read through the entire file always keeping the last two objects, and as soon as the read fails return them.
    As I said in your first thread, however, you would be much better off writing the objects with a set size (i.e. calling ByteArrayOutputStream(size) with a single max size rather than ByteArrayOutputStream( ) ) as you would then be able to use seek adding 4 (for the int) to size and multiplying by the position of the recordset you want to read (0 for the first). You would then, also be able to overwrite records and the such (which is the usually one of the main reasons for using something like RandomAccessFile, i.e. creating a Flat DB-Like File).
    Edit:
    And you would probably lose the int, then anyway (when using a set size), as it wouldn't be needed.

  • Need to get the number of messages displayed

    Dear All,
    I need to know whether the message area is having any messages or not. If messages are there then i need to get the exact number of the messages. I found the count in the class CL_WDR_MESSAGE_AREA. But the count is the private attribute. Is there any methods available to get the count of the number of mesages.
    Thanks & Regards,
    Raghuram K.R.

    Hi raghuram
    below is the code snippet to get the count of message displayed ..
    other than this what is your looking for Exactly. pls be clear so that we can help you out .
    *   get message manager
      DATA lo_api_controller     TYPE REF TO if_wd_controller.
      DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
      DATA :lt_messages_mgr TYPE if_wd_message_manager=>ty_t_messages,
            lv_string1 TYPE string ,
            lv_string2 TYPE string,
            lv_count TYPE i .
    *Message Manager Reference  
      lo_api_controller ?= wd_this->wd_get_api( ).
      lo_message_manager = lo_api_controller->get_message_manager( ).
    *   report 2  message
      lv_string1 = lo_message_manager->report_success( message_text  = 'test 1').
      lv_string2 = lo_message_manager->report_success( message_text  = 'test 2').
    *  get the list of message
      lt_messages_mgr = lo_message_manager->get_messages( ).
    *  count the no of message
      DESCRIBE TABLE lt_messages_mgr LINES lv_count.
    Regards
    Chinnaiya P
    Edited by: chinnaiya pandiyan on Oct 19, 2011 1:17 PM

  • Need to get trail Spacing using BIC Mapping tool

    Hi Experts,
    There is a stranage scenario were i need to get an output in a text file using trail spacing.
    for example here is the input for the BIC Mapping
    <DK03_SEG> ***************                     77700000000463518500000030000000202820100226 *********     </DK03_SEG>
    has at the starting and ending of the message there is a empty space.
    but when i run BIC Mapping i am getting the out put in this fashion
          *********77700000000463518500000030000000202820100226
    only could get the spaces in the start of message at the end BIC is trimming the spaces at the end .
    how this  can be achieved.
    @@ consider * as spaces
    Thanks
    Sampath

    Hi Seven,
    I have tried that option but unable to get the required output. Any other option were it can be achieved.
    Thanks
    Sampath

  • Getting an object using madataService.getItem()

    i can't get an item using
    maDataService.getItem({itemId:valueId})
    i'm using Flex and Hibernate ,i can get collection using
    maDataService.fill() but i don't know what's wrong with getItem().
    what can be wrong ?
    thx

    userList is a collection of Strings, yes?
    <c:set var="user" scope="session">${userList[2]}</c:set>This sets user equal to a member of that list, a string.
    first name: <c:out value="${user.firstName}"/>You're calling user.firstName - there is no firstName member of string...
    If you want to send a bunch of strings to your view and do the same thing with all of them, put them in a list and iterate over them.
    If you want to send data on a bunch of users and do the same thing with each group of information, I'd recommend creating a class to represent the data for each user, sending a list of those to your view, and iterating over them.
    If you just want to send firstName, lastName, middleName, anotherName to the view and do different things with each of them, don't pack them in a list - just send them as standalone strings and do what you will.
    Hope this helps!
    - Kyle

  • Help, can I declare an object using a variable name

    I need to make a bunch of objects using a for loop, so I was wanting to name the object one of the variables that I read. But I basically want to know if I can do this.
         private Software makeObject(String proName, int proStock, double proPrice,String objName){
              Software objName = new Software(proName,proStock,proPrice);
              return objName;
    I want to create a Software object using the objName inputted to it. The software object holds three fields as you can see. The name, num in stock, and price. However it won't let me do this, because it says objName is a duplicate variable. Help would be appreciated

    private Software makeObject(String proName, int proStock, double proPrice,String objName){
    Software objName = new Software(proName,proStock,proPrice);
    ... it won't let me do this, because it
    says objName is a duplicate variable. Help would be
    appreciatedWell, it is duplicate. Change the name of one or the other of those variable names.

  • How do I get Mozilla to use the page name for the actual bookmark name instead of the URL when I bookmark a page

    I just noticed this (in comparison to Internet Explorer): In IE, when you favorite a webpage, it uses the actual name of the webpage (for example, for this page, it would be "Ask a Question Firefox Help" as the bookmark name), but in Mozilla it uses the URL address as the bookmark name. I was wondering if it was at all possible to change my Mozilla settings in order to make it use the webpage name as the bookmark name instead of the URL address? I hope everyone understands what I'm getting at? If anyone can help me, I would really appreciate it. Thanks.

    Does this happen with each bookmark?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Problems with bookmarks and history not working properly can be caused by a corrupted places.sqlite database file.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
    You can try to check and repair the places database with this extension:
    *https://addons.mozilla.org/firefox/addon/places-maintenance/

  • External programs get error 1006 using local server name

    I have a brand new Solution Manager EHP1 installation on Windows 2003sp2/SQL.
    The installation succeeded ok, but I cannot configure STMS.
    The reason appears to be that external commands (i.e. tp) are not working correctly.
    If I execute in SM49 the external command 'ENV' and use the default host, it fails with error 1006
    If I specify the target host and use the 'short' name of the host, e.g. SAPSMT it fails with the same error
    If I specify the target host and use the fqdn of the host e.g. SAPSMT.saproot.local it works ok.
    If I specify the target host as 'localhost' it also works ok.
    The 'HOSTNAME' command responds with SAPSMT
    There is only a single NIC, so its not anything to do with multiple NICs.
    I'm running the latest kernel and sapxpg now and it still acts the same.
    Type 3 RFC destinations to SAPSMT work ok.
    I can't really get anything else to fail: just external commands with the short name (or default) as the target.
    Has anyone seen this before and have a solution or workaround?
    I am almost sure it will be a windows configuration problem, but I can't see what it could be.
    Thanks, Andy.

    Hi Pradi,
    there are no entries in the HOSTS file related to this.
    I do think this is the right area: here is the output of niping, which is suggesting that the address lookup of the ip address goes to the fully qualified domain name rather than the hostname.
    E:\usr\sap\SMT\DVEBMGS00\exe>niping -v -H SAPSMT
    Hostname/Nodeaddr verification:
    ===============================
    Hostname of local computer: SAPSMT                        (NiMyHostName)
    Lookup of hostname: SAPSMT                                (NiHostToAddr)
        --> IP-Addr.: 10.115.227.36
    Lookup of IP-Addr.: 10.115.227.36                         (NiAddrToHost)
        --> Hostname: SAPSMT.saproot.local
    Lookup of hostname: SAPSMT                                (NiHostToAddr)
        --> IP-Addr.: 10.115.227.36
    Lookup of IP-Addr.: 10.115.227.36                         (NiAddrToHost)
        --> Hostname: SAPSMT.saproot.local
    If I add the hostname SAPSMT to the hosts file (together with the alias as you suggested), it then gives:
    E:\usr\sap\SMT\DVEBMGS00\exe>niping -v -H SAPSMT
    Hostname/Nodeaddr verification:
    ===============================
    Hostname of local computer: SAPSMT                        (NiMyHostName)
    Lookup of hostname: SAPSMT                                (NiHostToAddr)
        --> IP-Addr.: 10.115.227.36
    Lookup of IP-Addr.: 10.115.227.36                         (NiAddrToHost)
        --> Hostname: SAPSMT
    Lookup of hostname: SAPSMT                                (NiHostToAddr)
        --> IP-Addr.: 10.115.227.36
    Lookup of IP-Addr.: 10.115.227.36                         (NiAddrToHost)
        --> Hostname: SAPSMT
    However, having made this change and restarted, I still get the problem.
    Thanks for the help, by the way.
    Andy

  • Need help getting Flash object to work

    The latest version of Dreamweaver automatically converted my
    Flash code to be compatible with IE, but now my Flash object
    doesn't work in any browser. What is wrong here?

    You need it for this reason -
    It's IE-only behaviour as a result of changes Microsoft made
    several
    years ago to their browser, regarding how Active Content
    (Flash, Quicktime
    etc)
    is handled, after losing a high profile court case.
    http://blog.deconcept.com/2005/12/15/internet-explorer-eolas-changes-and-the-flash-plugin/
    Background:
    http://en.wikipedia.org/wiki/Eolas
    See also
    http://www.adobe.com/devnet/activecontent/
    If you're running Dreamweaver 8.0.2/CS3, the fix is already
    built into DW's
    interface.
    If not, try
    http://blog.deconcept.com/swfobject/
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "AngryCloud" <[email protected]> wrote in
    message
    news:[email protected]...
    >I can't provide a link, but I know where the problem
    lies. It is on the
    > JavaScript line. In Dreamweaver, if I set the source to
    a static file, it
    > automatically removes the '.swf' on the end of the
    source in the code, so
    > 'flashgame.swf' becomes just 'flashgame'. But with a
    dynamic source, the
    > '.swf'
    > is included in the dynamic string, and is not removed.
    So when I load the
    > page
    > in the browser, I believe the JavaScript object ends up
    setting the source
    > to
    > something like 'flashgame.swf.swf', and therefore does
    not display.
    >
    > So first of all, why do I need the JavaScript code at
    all? The Object code
    > seems to work just fine. And if it necessary to keep the
    JavaScript code,
    > how
    > do I prevent it from adding that extra '.swf' on the
    end?
    >
    >
    Dynamic Source:
    > <script type="text/javascript">
    > AC_FL_RunContent(
    > 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
    > version=9,0,28,0','width','32','height','32',
    'src','<?php echo
    > $row_submission_data['source']; ?>'
    > ,'quality','high','pluginspage','
    http://www.adobe.com/shockwave/download/downloa
    > d.cgi?P1_Prod_Version=ShockwaveFlash' ); //end AC code
    > </script>
    >
    >
    Static Source:
    > <script type="text/javascript">
    > AC_FL_RunContent(
    > 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
    > version=9,0,28,0','width','550','height','400',
    'src','flashgame'
    > ,'quality','high','pluginspage','
    http://www.adobe.com/shockwave/download/downloa
    > d.cgi?P1_Prod_Version=ShockwaveFlash' ); //end AC code
    > </script>
    >

  • HELP!!! ... need to get Window Handle using PDA module

    I am trying to find a way to get the current window handle using the PDA module.  I need this handle to call other function via Win dll's.  Has anyone done this before?  Any help would be greatly appreciated (using windows mobile 6.1 and Labview PDA 8.5)  Thanks
    Greycat

    Thanks Mike ...
    I understand that this function does exist, but somehow I am not writing my wrapper properly or calling the function properly because everytime I build my labview app I get a "GetForegroundWindow is a missing VI or C file." - I cannot for the life of me figure this out ... what I was really asking is if anyone has succeeded calling this function and getting the Window Handle.  What I really want to do is run my Labview program on the PDA in full screen mode with no title bar and no SIP button visible or accessible, but to my knowledge, that will take a function call to the aygshell.dll (namely the SHFullScreen function) and that function requires a window handle to work properly ... any more help would be appreciated ... Thanks again
    Greycat

  • Why can't i get an object onto the display list!!!

    hi. i have this really basic class and all it does is create a button...i have another class called main where i want to put the button on the stage...problem is it all compiles but can't get the button to display...help would be greatly appreciated. thanx
    public class Main extends Sprite
    public function Main()
    var button1:ButtonPut = new ButtonPut();
    addChild(button1)
    package as_files.list
    import flash.display.Sprite;
    import spark.components.Button;;
    public class ButtonPut extends Sprite
    public function ButtonPut()
    var but:Button = new Button();
    but.x=100;
    but.y=100;
    but.width=100;
    but.height=100;
    addChild(but);

    Here is another thread that touches this issue:
    http://forums.adobe.com/thread/734266?tstart=0
    A guy references this blog:
    http://seeing-is-believing.blogspot.com/2007/11/flex-components-in-flash-example-with.html

  • Can't access object using "id" or "name" if created with actionscript

    How can you register an instance of an object with actionscript so that it's id or name value is accessible?
    I included a simple example where a Button is created using mxml and in the same way it is created using actionscript.  The actionscript object is inaccessible using it's "id" and "name" property.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   creationComplete="application1_creationCompleteHandler(event)">
        <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                protected function application1_creationCompleteHandler(event:FlexEvent):void
                    import spark.components.Button;
                    var asBtn:Button = new Button();
                    asBtn.label = "actionscript";
                    asBtn.x = 200;
                    asBtn.id = "asButton";
                    asBtn.name = "asButtonName";
                    addElement(asBtn);
                    trace("mxmlButton="+this["mxmlButton"].label); // returns: mxml  label
                    //trace("mxmlButton="+this["asButton"].label); // returns runtime error: ReferenceError: Error #1069: Property asButton not found on TestId and there is no default value.
                    //trace("mxmlButton="+this["asButtonName"].label); // returns runtime error: ReferenceError: Error #1069: Property asButtonName not found on TestId and there is no default value.
            ]]>
        </fx:Script>
        <s:Button
            id="mxmlButton"
            label="mxml label"
            alpha="0.8"/>
    </s:Application>

    Hi Dan,
    It is a very rare occurrence when I miss not being able to access an object (object property, really) using the ["name"] notation for objects created using actionscript.
    In MXML the compiler is conveniently adding an attribute to the class with the same name as the id, so you can conveniently refer to it using the [] notation. While we explicitly specify an application container to use, the MXML compiler creates a custom container which is a derivative of the base container and to that it adds properties for the children declared in MXML. I guess it also effectively calls "addElement" for us when  the container is being constructed.
    Your example assumes that using "addElement" to add the button to the application container is the same as declaring a variable (ie property ). It isn't, so there's no point in looking for an property of the name "as3Button" using the [] notation, because it doesn't exist. The container is managing a collection of children in it's display list and that's not the same as being accessible as properties of the container.
    Generally speaking, accessing properties using the ["name"] syntax isn't necessary.
    Paul
    [edit: you may wonder why "addElement" doesn't conveniently also add the "id" attribute to be an property of the container class. Unfortunately, it can't because the container class would need to be dynamic and it's not. A further complication would be that adding properties at runtime would invite naming clashes at runtime with associated mayhem. MXML can do this because the compiler generates the class and can trap name duplication at compile time.
    Great question, BTW.
    -last edit changed my "attributes" to be "properties" in line with Adobe's terminology]

  • How to get static attribute using it's name as a string

    I have an app with about 100 unique combo boxes (it's a gov't requirement, I'm not that bad a designer ) and I would like to define all the choices in a single separate file like this:
    package components {
    import mx.collections.ArrayCollection;
        public class Choices    {
      [Bindable] public static var A0310A:ArrayCollection = new ArrayCollection ( [
                                          { value:"01", label:"Admission"},
                                          { value:"02", label:"Quarterly" },   
                                     ........snip ..
                                          { value:"99", label:"NOT OBRA Required" }]);
              public static function getChoices(name:String):ArrayCollection {
                  var temp:ArrayCollection = ????????????????
                  return temp;
        }//----------------end of class--------------------------------
    }//======================== end of package==============================
    I want to use it like this
    <my:ComboBox id="mdscombo" tag="A0310A" />
    Where the definition of my:ComboBox includes code like this
                 var zz:ArrayCollection = Choices.getChoices(name);
    but I cannot find any function that will let me do this.  I really don't want to clutter the code by creating a name->object lookup table.
    I had also considered using the XML data type but I would have the same issue unless I had all the choices under a single root (possible) but that could be a nightmare in debugging typo's in the XML.
    Any suggestions???

    The technique you describedd worked perfectly.
    I've yet to deploy my first production app in Flex, so I would appreciate what you see in my approach that is "not desireable"  If I'm heading down a bad path I would like to know while I can still refactor.

Maybe you are looking for

  • Python: Amazon API - fetch Album Art

    Hi there, I'm a total noob in Python (and programming generally) and I want to write a little script that fetches album-art from Amazon I looked into the Boto documentation but I didn't found anything about images. I'm sorry for being ignorant but I

  • Screen Capture floating app (no multiple use)

    Hello All, When i tried to use Screen capture (floating small app),it closes by itslf after a single capture. This defies to very purpose of floating app (in my opinion) Am i the only one seeing it (bug in my device)? or someone else share the same c

  • How to create a seamless DVDrom for the pc?

    I'm creating an interactive DVDrom for use on mainly windows xp machines. There will be a main movie & also an interactive flash projector I want them to be able to access if they play the dvd a computer. I've gone over the dvd@ccess description in t

  • Studio Creator Drop down binding Issuse

    Dear All I want to bind to selected value of drop down , whic is like that AssignAffiliateSupplier.affiliateSupplier.payment.paymentDueDate all class have getter and setter , this is not woking and also give an compilation error as , my IDE studio cr

  • Problem with XML FCP import - grey hash marks

    I have an XML import from FCP and roughly half of the clips have the  grey hash marks presumably because the clip is pointing to in and out points that are unavailable in the source file.  I've seen these hash marks when a clip was  shortened in an e