How to define the role of a resource (Portal and portlet)

Hello world

I have the name of the resource and I want a right of role to a resource (Portal, portlet, book...) but I don't know how to do this programmatically.

Please help me. Thank you

The code snippet below should help:

...
Roles of ArrayList = new ArrayList();
Roles.Add ("MyRole");

SecurityPolicyItem spi = new SecurityPolicyItem();
spi.setEntAppName (appName);
spi.setWebAppName (webappName);
spi.setResourceId("com_bea_p13n\tPortlet\tportlet2");
spi.setRoleList (roles);
spi.setCapability (PortalEntitlementConstants.VIEW);

then use SecurityPolicyManager to create the security policy
SecurityPolicyManager.createSecurityPolicy (spi);
...

Best regards, Stefan

Tags: Fusion Middleware

Similar Questions

  • How to check the roles agreed on a specific group?

    Hello

    How to check the roles granted to a specific group?

    If a user belongs to this group in particular, will have the same roles granted so much that the Group?

    Thank you.

    SQL> select grantee
      2  from dba_role_privs
      3  where granted_role = 'DBA';
    
    GRANTEE
    ---------------------------------
    SYS
    SYSTEM
    
  • How to define the rules of navigation in faces - config.xml dynamically?

    In jdev 12.1.2 I am studying and performing the adf faces demo (12.1.2 version).

    I am trying to implement the function of navigation like this:

    1. in the navigation tree in the left panel of the accordion will show the features of an application which is read from database tables;

    2. When you click on a node in the navigation tree, a corresponding function/page will be launched in the Panel to the right of the home page;

    3. the navigation tree nodes display names and information pages target will be resident in the database tables and will be read in my case, the control of data bindings.

    and now I know, the click action was executed in this file in the demo: componentGallerySideBarTree.jsff:

    ->action = "#{stamp.actionOutcome}"

    < af:tree id = "tree" value = "#{attrs.menuModel}" var = "stamp" = "single" rowSelection fetchSize = "200" "

    Summary = "#{uploading." Summary}"disclosedRowKeys =" #{attrs.menuModel.foldersTreeState} "autoHeightRows = '0'"

    displayRow selectedRowKeys = "#{attrs.menuModel.selectionState}" = "selected" "

    contentDelivery = 'immediate' emptyText = "there are no demos for this category.

    styleClass = "AFStretchWidth" >

    < f: facet name = "nodeStamp" >

    < af:panelGroupLayout id = "nodePgl" >

    < af:image source = "#{stamp.ico}" styleClass = "GalleryIcon" shortDesc = "Image of a tree node" "

    ID = "nodeImg" / >

    < af:switcher facetName = "#{stamp.children == null?' leaves ': 'notLeaf'}" id = "nodeSw" > "

    < f: facet = "journal batch name" >

    < af:link id = text = "#{stamp.label"leafLink"} '"

    shortDesc = "#{stamp.label} #{stamp.deprecated eq 'real'?" (not recommended) " :"} »

    action = "#{stamp.actionOutcome}"

    inlineStyle = "#{stamp.deprecated eq 'true'?-style: italic; color: gray':"} ' "

    selected = "true" >

    < af:target execute="@this"/ >

    < / af:link >

    < / f: facet >

    < f: facet name = "notLeaf" >

    < af:outputText id = value = "#{stamp.label"notLeafText"} ' shortDesc =" #{stamp.label} "/ >"

    < / f: facet >

    < / af:switcher >

    < / af:panelGroupLayout >

    < / f: facet >

    < / af:tree >

    and the value of actionOutcome was entered in this file DemoConfusedComponentsMenuModel.java:

    (for the case of the confused component navagation tree folder)

    private TreeModel _initConfusedComponents()

    {

    Confused components

    The list < DemoItemNode > confusedComponentsNodes = new ArrayList < DemoItemNode >)

    {

    {

    ..

    Add (new DemoItemNode ("Tabs", "/ confusedComponents/tabs.jspx","/adfdt/panelTabbed.png","confused.tabs"));

    Add (new DemoItemNode ("iterators","/ confusedComponents/iterators.jspx","/adfdt/iterator.png","confused.iterators" ""));

    }

    };

    DemoItemNode confusedComponentsGroup = new DemoItemNode ("Often confused", "/ images/folder.png", confusedComponentsNodes);

    List ConfusedComponentsList = new ArrayList();
    confusedComponentsList.add (confusedComponentsGroup);

    TreeModel confusedComponents = new ChildPropertyTreeModel (confusedComponentsList, _CHILDREN);
    Return confusedComponents;
    }

    In addition, there are elements in faces-config .xml to define the rules of navigation for the actions 'by clicking on the tree node.

    <>navigation-case

    < from outcome >confused.iterators< / de-results >

    < to view - id > /confusedComponents/iterators.jspx< / to-view-id >

    <!-< redirect / >->

    < / navigation-case >

    So, I can add a new entry in the navigation tree, like this:

    1. in DemoConfusedComponentsMenuModel.javaof the file: Add

    Add (new DemoItemNode ("Iterators", "/confusedComponents/cms.jspx","/ adfdt/iterator.png","confused.cms" ""));

    2. in the file faces - config.xml, add:

    <>navigation-case

    < from outcome >confused.cms< / de-results >

    < to view - id > /confusedComponents/cms.jspx< / to-view-id >

    <!-< redirect / >->

    < / navigation-case >

    and it works!- I have successfully added a new node in the navigation tree, called a new page created by myself cms.jspx.

    If I implement them using database tables (links datacontrols EO/VO),.

    I think I can put action = "#{stamp.actionOutcome}" by links.

    But how can I pay the entry in the faces-config file. XML? -That is to say:

    How to define the rules of navigation in faces - config.xml dynamically?

    Thanks in advance!

    ADF 12 c comes with support for JSF 2.0, you can use the implicit navigation feature.

    In short: you don't need to add case action property, any set of navigation in the name of the page (and include the path if necessary).

    In your case, the name of the action will be: ' / confusedComponents/cms.jspx ' and of course, you can link the action property of method that returns this string.

    If you want to add by the case of navigation program, try ConfigurableNavigationHandler.

    For example:

    Manager of ConfigurableNavigationHandler = (ConfigurableNavigationHandler) FacesContext.getCurrentInstance () .getApplication () .getNavigationHandler ();

    handler.getNavigationCases () .put (...);

    Dario

  • How to define the rules of holiday for the purchase of the Oracle?

    Hi all

    How to define the rules of holiday in the Workflow administrator to a particular position?


    Please help me with the screenshots.


    Thanks in advance

    Responsibility: System Administrator

    Navigation: Administrator Workflow-> Administration

    Click on the link "rule of holiday.

  • How to get the role (Hall) of the currently logged in user

    Hello

    BPM 11.1.1.5 / 11.1.1.5 JDeveloper / ADF BC

    I created a BPM process with 3 user tasks and human tasks associated with them, which will have jspx pages ADF TaskFlows.
    There will be 2 roles (lanes) in the BPM process. 2 tasks for a single role and 1 for the other role.

    Users will connect to the workspace of BPM to interact with the process

    I created a .jsff located in a delimited TaskFlow.
    I dropped this taskflow as region in all pages for the 3 UI jspx pages so that the region is reused. (Basically all users see the same content)

    But the behavior of the content will be dynamic based on the roles of users, Process Status and maybe some data from the database.
    For example, I want to the fields in the editable region when the process is created by the first user.
    After that the process of submission, he goes to the next user for approval. Then the user with the approval role can modify it.
    At the same time, if the user who submitted the process opens the task, it should be visible as Readonly for him.

    User (initiator) region - creates data - is editable
    User B (critical) - customer data - region is editable. The user opens the task that he argued. It should be readonly for him.
    The user has - receives Notification - area is read only

    Then

    I want to know if it is possible to get the currently logged into the role of the user (as defined in the corridors) in the BPM process.
    I want to get these roles in the ADF UI project and use it on the expression of readonly property in the .jsff file.

    Thanks for any help.
    Concerning
    Sameer

    You can use the following EL fields readOnly property to->

    #{securityContext.userInRole []}

  • How dynamically update the role of oracle using the trigger

    How dynamically update the role of oracle using the trigger:

    I have svmanger owner of schema in the database. There are five tables belonged to svmanager.

    Table A, B, C, D, E.

    I have a role that is played only to these tables under the scheme: SVMANAGER_READ_ONLY

    now, if I create a new table F under svmanager. the role that svmanager_read_only does not work is updated, so the user had assigned role cannot access table F.

    is there a way to create the trigger for this role dynamically update any when a table is created or deleted?

    Thank you.

    I really really really don't suggest to do this - it's a bad habit. If possible I'd just adding the grant as part of the steps to the role on the new creation of the table.
    But for fun here's how you can accomplish this:

    create or replace procedure execute_grant(v_ddl in varchar2)
    is
    begin
       execute immediate v_ddl;
    end;
    /
    
    create or replace trigger catch_create_table_trg after create on schema
    DECLARE
    
    ddl_job number;
    ddl_str varchar2(50);
    begin
       IF ora_dict_obj_type = 'TABLE' THEN
    
           ddl_str := 'GRANT SELECT ON '||ora_dict_obj_owner||'.'||ora_dict_obj_name||' TO SVMANAGER_READ_ONLY';
    
           dbms_job.submit(job => ddl_job,
           what => 'execute_grant(''' || ddl_str || ''');',
           next_date => sysdate+(5/24/60/60));
    
       END IF;
    end;
    /
    

    Test it

    create table F (id number(1));
    

    Validate

    select * from ROLE_TAB_PRIVS where ROLE = 'SVMANAGER_READ_ONLY';
    
  • How to define me as offline on MSN Messenger and Facebook Messenger?

    I could put myself as it appears offline in MSN Messenger.

    When I login in the Surface with my windows live id I am automatically connected to the MSN Messenger service.   That's fine most of the time, but I want to be able keep connected to windows live using my windows live id but appear offline for my friends in MSN Messenger.

    How to define me as offline on MSN Messenger and Facebook Messenger?

    While in the messaging application, sweep up slightly to the bottom of the screen, this brings up a bar downstairs with three choices. Select the State, choose Invisible. That should make you appear offline. I hope that works, please let us know if it does.

  • How to unregister the Microsoft 8 on 1 PC and reinstall on another PC?

    How to unregister the Microsoft 8 on 1 PC and reinstall on another PC?

    You are required for installation on PC 1 completely disassembling, (agreement 1 license = 1 computer)

    Then you can install on 2 PCs, if the version is a version upgrade, 2 PC must also have a current operating system eligible installed. The only problem you may encounter is the activation, it cannot activate via internet, otherwise you will have to activate by phone.

    If you need clarification, read; License terms for Microsoft software. Which is available to the page of Activation of Windows in the center of the Action.

  • How to understand the implementation of the plan in oracle I mean if I see two implementation plans for a single sql_id plans 2 How to determine the best execution plan? Links and answers are much appreciated. Thank you

    How to understand the implementation of the plan in oracle I mean if I see two implementation plans for a single sql_id plans 2 How to determine the best execution plan? Links and answers are much appreciated. Thank you

    How to understand the implementation of the plan in oracle I mean if I see two implementation plans for a single sql_id plans 2 How to determine the best execution plan? Links and answers are much appreciated. Thank you

    After two execution plans that have the same sql_id, so we can see what you're talking about.

    See "Oracle Explain Explain Plan optimizer" by Maria Colgan of the Oracle optimizer group

    http://www.Oracle.com/technetwork/database/bi-Datawarehousing/TWP-explain-the-explain-plan-052011-393674.PDF

    Examine the various aspects of a selectivity to parallel execution plan

    performance and understand what information you should be brilliant

    the plan can be overwhelming even for the most experienced DBA. This document

    offers a detailed explanation on each of the aspects of the execution plan and a

    Overview of what caused the CBO to make the decision, he did.

  • The knife tool develops a black line on the objects that I colored using the live paint bucket. How to get the tool knife to stop this and instead of being invisible?

    The knife tool develops a black line on the objects that I colored using the live paint bucket. How to get the tool knife to stop this and instead of being invisible?

    I understand that it is a live paint object you use.

    Try this:

  • How to find the path of reports to PDF and send them via JAVA?

    Hi expert,

    We have created many reports of OBIEE, how to find the way of reports to PDF and send them via JAVA?
    Catalog/shared /..., but it is a binary file that is not sent to the customers.

    Hey kobe,.

    You can try this:

    http://satyaobieesolutions.blogspot.com/2012/07/setting-up-iBOT-to-save-report-to.html

  • How to map the role defined in JDeveloper for LDAP

    Hello

    I'm trying to figure out how to map the Illustrazione roles when the BPM process design and the LDAP protocol.

    I have deployed on the soa server processes, I can see the ear on the page of the Console.

    I did the following:

    1. connect to the Oracle BPM workspace (http://localhost: 8001/bpm/workspace /) as the user WebLogic.

    2. click on the administration link.

    3. click on roles in the Administration Panel of the areas on the left, to the list of all different roles across all deployment processes.

    but I do not see my deployment process.

    Do you know why this is? In my approach I just added my roles for the corridor. Is this correct? Why can't I see not all roles deployed?

    Well, if you do not want to deploy physically, you can build your project. However, you may encounter errors during deployment of the projects built with success.

    I guess that you have a development/test environment where you can check if your application is deployed.

    Last resort - player process. For a process, really, it is deployed on a special partition on the soa infrastructure and should play not accessible by end users.

    See you soon,.

    Anatoli

  • Writing EXIF data (and how to define the side of the photo)

    Anyone had luck writing EXIF data in photos? Reading EXIF data are fairly easy, as demonstrated by "photobomber. Writing EXIF data seems to be more painful, however.

    In particular, I'm trying the face value of the photo.  I found mention on the web page of its existence in EXIF, with the code:

    0 x 4746

    That said, when I check the exif - tag.h, apparently not be listed.

    It is clear to me that this is a deal breaker or not.  The tags are listed in the exif - tag.h the only ones that can be used? Or are they simply definitions of convenience tag codes most commonly used?

    Thank you

    Daniel

    Incase others are reading this in the future and ask yourself how: my conclusion is that the best way to define metadata such as:

    -Photo rating

    -Tags

    -Description

    ... does NOT use EXIF.  On the contrary, it seems that XMP is a much better choice:

    http://en.Wikipedia.org/wiki/Extensible_Metadata_Platform

    Ideally, BB10 comes with the XMP library, and it can be easily added to your project. (right-click on the project node in "Project Explorer", go to the context menu item 'Configure', then 'add the library')

    Here's the code I added bo my main.cpp:

    //-----------------------------------------------------------------------------
    // XMP
    //-----------------------------------------------------------------------------
    
    // Must be defined to instantiate template classes
    #define TXMP_STRING_TYPE std::string
    
    // Must be defined to give access to XMPFiles
    #define XMP_INCLUDE_XMPFILES 1
    
    #define UNIX_ENV 1
    
    #include "xmp/XMP.incl_cpp"
    #include "xmp/XMP.hpp"
    
    #include 
    #include 
    
    using namespace std;
    
    //-----------------------------------------------------------------------------
    

    ... and here's what I added to the .h file that I wanted to use XMP in: (it does not include the XMP.incl_cpp at the top of the notice)

    //-----------------------------------------------------------------------------
    // XMP
    //-----------------------------------------------------------------------------
    
    #define TXMP_STRING_TYPE std::string
    #define XMP_INCLUDE_XMPFILES 1
    #define UNIX_ENV 1
    
    #include "xmp/XMP.hpp"
    
    #include 
    #include 
    
    using namespace std;
    
    //-----------------------------------------------------------------------------
    

    And finally, here's a big copy and paste part of the key code that I adapted to the code example in the XMP SDK I downloaded separately for read/write some common tags.  Feel free to use this code in your own applications, or to adapt it, if that's helpful.

    int ImageViewContainer::xmpWrite()
    {
        qDebug() << "xmpWrite()";
    
        string filename = file.toStdString();
    
        if (!SXMPMeta::Initialize())
        {
            qDebug() << "XMP: An error occurred initializing XMP.";
            return -1;
        }
    
        XMP_OptionBits options = 0;
    
        #if UNIX_ENV
            options |= kXMPFiles_ServerMode;
        #endif
    
        if (!SXMPFiles::Initialize(options))
        {
            qDebug() << "XMP: An error occurred initializing SXMPFiles.";
            return -1;
        }
    
        try
        {
            // Try using the smart handler.
            XMP_OptionBits opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUseSmartHandler;
    
            bool ok;
            SXMPFiles myFile;
    
            // Open the file.
            ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
            if (!ok)
            {
                qDebug() << "XMP: No smart handler available for " + file + ". Trying packet scanning.";
    
                // Now try using packet scanning.
                opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUsePacketScanning;
                ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
            }
    
            // If the file is open then read the metadata.
            if (ok)
            {
                qDebug() << "XMP: Opened: " << file;
    
                // Create the xmp object and get the xmp data.
                SXMPMeta meta;
                myFile.GetXMP(&meta);
    
                // Should we be doing this?
                meta.SetProperty(kXMP_NS_XMP, "CreatorTool", "Updated by PhotoStar", 0);
    
                int ratingToSet = rating;
                if (ratingToSet == -1) { ratingToSet = 0; }
                meta.SetProperty(kXMP_NS_XMP, "Rating", QString::number(ratingToSet).toStdString(), 0);
    
                // Required before we can call other functions that refer to this namespace
                // without getting an exception.
                std::string tmp;
                meta.RegisterNamespace("http://ns.microsoft.com/photo/1.0/", "MicrosoftPhoto", &tmp);
    
                if (ratingToSet == -1)
                {
                    meta.DeleteProperty("http://ns.microsoft.com/photo/1.0/", "Rating");
                }
                else
                {
                    int microsoftRating;
    
                    // Mapping:
                    // xmp:Rating=1 -> MicrosoftPhoto:Rating=1
                    // xmp:Rating=2 -> MicrosoftPhoto:Rating=25
                    // xmp:Rating=3 -> MicrosoftPhoto:Rating=50
                    // xmp:Rating=4 -> MicrosoftPhoto:Rating=75
                    // xmp:Rating=5 -> MicrosoftPhoto:Rating=100
    
                    if (ratingToSet == 1)
                    {
                        microsoftRating = 1;
                    }
                    else
                    {
                        microsoftRating = (ratingToSet - 1) * 25;
                    }
    
                    qDebug() << "MicrosoftPhoto:Rating: " << QString::number(microsoftRating);
                    meta.SetProperty("http://ns.microsoft.com/photo/1.0/", "Rating", QString::number(microsoftRating).toStdString(), 0);
                }
    
                // Delete old tags. (?)
                meta.DeleteProperty(kXMP_NS_DC, "subject");
    
                // Tags
                for (int i = 0; i < tags.size(); ++i)
                {
                    string value = tags[i].toStdString();
                    meta.AppendArrayItem(kXMP_NS_DC, "subject", kXMP_PropArrayIsOrdered, value, 0);
                    //meta.SetArrayItem(kXMP_NS_DC, "subject", i + 1, value, 0);
                }
    
                meta.SetLocalizedText(kXMP_NS_XMP, "Description", "en", "en-US", description.toStdString(), NULL);
    
                // Update the Metadata Date
                XMP_DateTime updatedTime;
    
                // Get the current time. This is a UTC time automatically adjusted for the local time.
                SXMPUtils::CurrentDateTime(&updatedTime);
                //if (meta.DoesPropertyExist(kXMP_NS_XMP, "MetadataDate"))
                //{
                    meta.SetProperty_Date(kXMP_NS_XMP, "MetadataDate", updatedTime, 0);
                //}
    
                // Now update alt-text properties
                //meta.SetLocalizedText(kXMP_NS_DC, "title", "en", "en-US", "Kind of pretty");
    
                // For debugging
                if (false)
                {
                    // Serialize the packet and write the buffer to a file.
                    // Let the padding be computed and use the default linefeed and indents without limits.
                    string metaBuffer;
                    meta.SerializeToBuffer(&metaBuffer, 0, 0, "", "", 0);
    
                    //qDebug() << QString::fromStdString(metaBuffer);
    
                    // Write the packet to a file as RDF
                    writeRDFToFile(&metaBuffer, filename + "_XMP_RDF.txt");
                }
    
                // Check we can put the XMP packet back into the file.
                if (myFile.CanPutXMP(meta))
                {
                    // If so then update the file with the modified XMP.
                    myFile.PutXMP(meta);
                }
                else
                {
                    // Silent for now. TODO: Should this be indicated in
                    // the UI somehow?
                    qDebug() << "XMP: Can't write to file.";
                }
    
                // Close the SXMPFile. This *must* be called. The XMP is not actually written and the
                // disk file is not closed until this call is made.
                myFile.CloseFile();
            }
            else
            {
                qDebug() << "XMP: Unable to open " << file;
            }
        }
        catch(XMP_Error & e)
        {
            qDebug() << "XMP ERROR: " << QString::fromStdString(e.GetErrMsg());
        }
    
        // Terminate the toolkit
        SXMPFiles::Terminate();
        SXMPMeta::Terminate();
    
        return 0;
    }
    
    int ImageViewContainer::xmpRead()
    {
        qDebug() << "xmpRead()";
    
        string filename = file.toStdString();
    
        if (!SXMPMeta::Initialize())
        {
            qDebug() << "XMP: An error occurred initializing XMP.";
            return -1;
        }
    
        XMP_OptionBits options = 0;
    
        #if UNIX_ENV
            options |= kXMPFiles_ServerMode;
        #endif
    
        if (!SXMPFiles::Initialize(options))
        {
            qDebug() << "XMP: An error occurred initializing SXMPFiles.";
            return -1;
        }
    
        try
        {
            // Try using the smart handler.
            XMP_OptionBits opts = kXMPFiles_OpenForRead | kXMPFiles_OpenUseSmartHandler;
    
            bool ok;
            SXMPFiles myFile;
    
            // Open the file.
            ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
            if (!ok)
            {
                qDebug() << "XMP: No smart handler available for " + file + ". Trying packet scanning.";
    
                // Now try using packet scanning.
                opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUsePacketScanning;
                ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
            }
    
            // If the file is open then read the metadata.
            if (ok)
            {
                qDebug() << "XMP: Opened: " << file;
    
                // Create the xmp object and get the xmp data.
                SXMPMeta meta;
                myFile.GetXMP(&meta);
    
                bool exists;
    
                // Stores the value for the property.
                string value;
    
                // XMP Rating
                exists = meta.GetProperty(kXMP_NS_XMP, "Rating", &value, NULL);
                if (exists)
                {
                    rating = QString::fromStdString(value).toInt(&ok);
                    if (!ok)
                    {
                        rating = -1;
                    }
                }
                else
                {
                    rating = -1;
                }
    
                // Microsoft Rating (only look for this if xmp:Rating is missing)
                if (rating == -1)
                {
                    // Required before we can call other functions that refer to this namespace
                    // without getting an exception.
                    std::string tmp;
                    meta.RegisterNamespace("http://ns.microsoft.com/photo/1.0/", "MicrosoftPhoto", &tmp);
    
                    exists = meta.GetProperty("http://ns.microsoft.com/photo/1.0/", "MicrosoftPhoto:Rating", &value, NULL);
                    //exists = meta.GetProperty(kXMP_NS_XMP, "Rating", &value, NULL);
                    if (exists)
                    {
                        rating = QString::fromStdString(value).toInt(&ok);
                        if (!ok)
                        {
                            rating = -1;
                        }
                        else
                        {
                            // The Microsoft rating is 0, 25, 50, 75, 100.
                            rating /= 25;
                        }
                    }
                    else
                    {
                        rating = -1;
                    }
                }
    
                value.clear();
    
                qDebug() << "XMP Rating: " << rating;
    
                // Tags
                tags.clear();
                int arraySize = meta.CountArrayItems(kXMP_NS_DC, "subject");
                for (int i = 1; i <= arraySize; i++)
                {
                    meta.GetArrayItem(kXMP_NS_DC, "subject", i, &value, 0);
                    qDebug() << "XMP Tag[" << i << "]: " << QString::fromStdString(value);
                    tags.append(QString::fromStdString(value));
                }
    
                value.clear();
    
                // Description
                meta.GetLocalizedText(kXMP_NS_XMP, "Description", "en", "en-US", NULL, &value, NULL);
                description = QString::fromStdString(value);
                qDebug() << "XMP Description: " << description;
    
                timestamp = QDateTime();
                XMP_DateTime updatedTime;
                // Get the current time. This is a UTC time automatically adjusted for the local time.
                SXMPUtils::CurrentDateTime(&updatedTime);
                if (meta.DoesPropertyExist(kXMP_NS_XMP, "MetadataDate"))
                {
                    meta.GetProperty_Date(kXMP_NS_XMP, "MetadataDate", &updatedTime, 0);
                    if (updatedTime.hasDate)
                    {
                        if (updatedTime.hasTime)
                        {
                            timestamp = QDateTime(QDate(updatedTime.year, updatedTime.month, updatedTime.day), QTime(updatedTime.hour, updatedTime.minute, updatedTime.second));
                        }
                        else
                        {
                            timestamp = QDateTime(QDate(updatedTime.year, updatedTime.month, updatedTime.day), QTime(0, 0, 0));
                        }
                    }
                }
    
                // Close the SXMPFile. The resource file is already closed if it was
                // opened as read only but this call must still be made.
                myFile.CloseFile();
            }
            else
            {
                qDebug() << "XMP: Unable to open " << file;
            }
        }
        catch(XMP_Error & e)
        {
            qDebug() << "XMP ERROR: " << QString::fromStdString(e.GetErrMsg());
        }
    
        // Terminate the toolkit
        SXMPFiles::Terminate();
        SXMPMeta::Terminate();
    
        return 0;
    }
    

    Note that the code above makes use of some class member variables:

        int rating;
        QList tags;
        QString description;
        QDateTime timestamp;
    

    One final note: there is a code that deals with the MicrosoftPhoto:Rating XMP tag. It's because I'm on Windows and I noticed that if you click on a photo in Windows Explorer, it allows you to display/change some meta (such as star ratings) data directly in Explorer. When you do so, it sets the MicrosoftPhoto:Rating tag (as well as the tag xmp:Rating, I believe). Once, he put that, if your application updates the xmp:Rating tag but don't update the MicrosoftPhoto:Rating tag and the file returns on Windows, then he continues to use the old notation before your update app. (he seems to ignore xmp:Rating if MicrosoftPhoto:Rating is present)

  • How to access the "Check Box" card resource

    Hello, I currently use 11.1.1.3.0 from IOM.

    I created a resource object, a form and an adapter that uses the java code that I created.

    In the form, I have two checkboxes, which act as Boolean values. These boxes should be introduced to the java method, that I created. I have downloaded the jar, went into the task of the adapter and began to fill the input parameters when I realized that I don't know how do to access the data card resource.

    So, how can I get it back of the IOM or not a selected user 'true' or 'false' (regarding the checkbox) and enter the java method via the console design?

    Can someone help me with this?

    You will need to create a process of type definition 'disposition' and specify the resource "Unix Linux" and the table as "US_ULHOST". Once you create the process, you will need to create your workflow (i.e. to define tasks that need to be called in a certain order) and connect your adapter to these tasks. When you attach your card you must map the entrance / exit of the adapter to the task. Thus, by mapping the entry, you will have the option to select "process data" and there you will see your form fields. I would say through the developer's guide to a better understanding of the procurement process and etc.

    -Marie

  • How to change the name of provisioned resource account

    Hello

    In the custom connector that we have currently in place when an account is put in service the name of the account appears as a random value.

    How do change the name of the account funded from this random number to some loginid to say name invalid.

    Thanks in advance.

    Try the following steps:

    To change the name of the account to the account user id, you can follow the instructions below:

    1. open the form of the process of the resource that you want to display the user id as the name of account, instead of this strange number for example. UD_IPNT_USR

    2. create a new version of the form.

    3. go in the Properties tab.

    4. Select the user ID property and click on add property button.

    5. Select the account name and the value is false.

    6. save the form and make the version active.

    7 connect to IOM self-service console, select a user with iplanet account for her. You can see the user id of the account in the account instead of the strange number name,

Maybe you are looking for