A-team Mobile Accelerator persistence: persistence specific user?

Hey,.

is it possible to store user-specific responses of RESTING in the sqlite DB and also reading for the current user?

The idea is that another user can log on to the same device and receives different data from webservice - but the old user data could contain changes offline and cannot be deleted.

A column for the specific user in each table would solve that problem, but it is possible to map a variable session scope of te to a column in the persistence - mapping.xml to hold the data of the user next to eachother and filter for the current user?

Thanks for the help!

Marcus

Marcus,

Best way to do this is to override the executeLocalFindAll method in your class of service to restrict the query based on the current user. Something like this:

@Override

List protection executeLocalFindAll()

{

DBPersistenceManager h = getLocalPersistenceManager();

ArrayList searchAttrs = new ArrayList ();

searchAttrs.add ("UserName");

String userName = (String) AdfmfJavaUtilities.evaluateELExpression("#{securityContext.userName}");

Return pm.find (Department.class, username, searchAttrs);

}

To get the current username stored with each row in each table, is a little more complicated, you can not specify such a value in persistence - mapping.xml.

What you could do is:

-Add the user name attribute to each data object

-Add the USER_NAME column for each table

-Add the mapping of attr user name for each class descriptor in the persistence-mapping

-In the constructor by default each Java class data object, set the user name in assessing #{securityContext.userName}

After a service call is made, the created entities will all have the username and these features are used to create lines in the comic book.

When loading of the lines of the DB, this value by default user name will be substituted bby the value stored in the DB (but if alweays filter on the current user is not serious)

Or, another approach is to create a subclass of the DBPersistenceManager and override the insertEntity method to add the user name attribute or, if you want to add the column, not the attribute to each entity, override the method insertRow.

Note that in waiting for the actions of synchronization data by a previous user will be synchronized first when the current user is back online.

Steven Davelaar,

Oracle Mobile A-team.

Tags: Oracle Mobile

Similar Questions

  • Persistence-A-team Mobile Accelerator

    Hello

    I want to know y at - it opportunities in the persistence infrastructure A-team in order to limit the creation of no. of java classes.

    for an example to consider.

    {

    "user":

    {

    "username":

    },

    "link":

    {

    'weblink ';

    },

    'Image ':

    {

    "Profile-image":

    },

    "details":

    {

    'name':' ',

    'name ':

    }

    }

    Now this framework really create four class for me, but I want to create only one class User.java that contains the field just as username, Internet link, profile picture, name, name etc. is it possible to combine all the field into a single class and create a table in the database file

    and this class of user to map to the database table, using the framework of persistence A-team?

    Yes, to get what you want, it takes a little 'fool' AMPA. By default, you do not get a surrounding class because your payload starts with an anonymous JSON object.

    What you can do is the following:

    -Use the option to specify a charge of the sample and surround your payload with hooks so that it becomes a JSON array:

    [{

    "user":

    {

    "username":

    },

    "link":

    {

    'weblink ';

    },

    'Image ':

    {

    "Profile-image":

    },

    "details":

    {

    'name':' ',

    'name ':

    }

    }]

    -Check the box "flatten nested objects.

    -go to the next page of the wizard, and you will see a suggested class you want to rename to something like 'user '.

    The AMPA enforcement code will be able to treat your GET request correctly, regardless of whether or not your payload is sent in the form of a JSON array.

    Steven Davelaar,

    Oracle Mobile A-team.

  • JDEVELOPER 12.1.3 - MAF 2.1 - JDK 1.8 - declarative REST-JSON consumer services and persistence with Oracle A-team Mobile Accelerator for Oracle MAF persistence

    I was trying to find the below tutorial accelerator MAF:

    http://docs.Oracle.com/CD/E53569_01/tutorials/tut_jdev_maf_persistance/tut_jdev_maf_persistance.html

    For part 2 of this tutorial, after that a successful project viewcontroller HFrepos application deployment below url (with ip address) does not show expected results:

    http:// < YOUR_IP >: 7101/HRRest/Persistence/v1.0/Model-1/Query/Department.FindAll

    This blocks any further development for the hand accelerator on.

    Kindly advice on any changes in addition to the measures mentioned in the tutorial.

    Kind regards

    Dushyant Lad

    Dushyant,

    The typical reasons for this error are:

    -The name of your persistence unit is not 'Model 1', but something else, like "model 1". You then need to change the URL accordingly (and it is case sensitive)

    -You has not successfully added topink-dataservoices-web-.jar to your project, as explained in step 3.2 in part II

    If you still can't find the mistake you have done by following the steps, and you want to continue with part 3 (which is what the tutorial is all about), then you can download the completed the HFREPOS zip file. (Same link can be found in the tutorial)

    Steven Davelaar,

    Oracle Mobile A-team.

  • A-team Mobile persistence Accelerator - Insertion into the child records for a Parent-child data objects

    Hello team

    We use persistence Mobile Accelerator for our application of MAF. We must build couple of REST services for it (Fetch, Create, Update), problem is we are able to insert/update of the parent records but we are not able to create child records.

    It seems when we ask the operation of creation in the book of the child, is no new line for child is created.

    Here is the screenshot of the data control wizard:

    parent.pngchild.png

    Here is the task (update) and desktop (create) JSON format (TaskAssignment is the address of the child)

    PUT the task:

    {

    'Task': {}

    'ACTIVITY_ID': 100,.

    'PROJECTID': 100,.

    'ACTIVITY_NAME': "string",.

    'DESCRIPTION': 'string ',.

    'PARENT_ACTIVITY_ID': 100,.

    'STATUS': "string",.

    'PRIORITY': "string",.

    'PERCENTAGE_COMPLETE': 100,.

    "START_DATE": "2008-09 - 28 T 21: 49:45.

    "END_DATE": "2014-09 - 18 T 19: 18:33.

    'ETA': ' 2006-08 - 19 T 13: 27:14 - 04:00 ",".

    'ESTIMATED_HOURS': 100,.

    'ACTUAL_HOURS': 100,.

    'OWNER_USER_ID': 100,.

    'CREATED_BY': "string",.

    "CREATION_DATE': ' 2009-05 - 16 T 08: 42:28"

    'LAST_UPDATED_BY': 100,.

    'LAST_UPDATE_DATE': ' 2003-08 - 08T 20: 18:37 - 04:00 ",".

    "TaskAssignment": [{}

    'ASSIGNMENT_ID': 1000.00.

    'PROJECT_TEAM_MEMBER_ID': 1000.00.

    "START_DATE": "2012-09 - 13 T 09: 00:34 - 04:00", ".

    "END_DATE": "2009-10 - 14 T 03: 16:36."

    'CREATED_BY': "string",.

    'CREATION_DATE': ' 2010-03 - 18 T 12: 05:32.

    'LAST_UPDATED_BY': "string",.

    "LAST_UPDATE_DATE": "2018-12 - 28 T 14: 51:14 - 05:00", ".

    'FAVORITE_FLAG': "string".

    } ]

    }

    }

    Workstation:

    {

    "Task": [{}

    "ACTIVITY_ID": 1000.00.

    'PROJECTID': 1000.00.

    'ACTIVITY_NAME': "string",.

    'DESCRIPTION': 'string ',.

    'PARENT_ACTIVITY_ID': 1000.00.

    'STATUS': "string",.

    'PRIORITY': "string",.

    'PERCENTAGE_COMPLETE': 1000.00.

    "START_DATE": "2008-09 - 28 T 21: 49:45.

    "END_DATE": "2014-09 - 18 T 19: 18:33.

    'ETA': ' 2006-08 - 19 T 13: 27:14 - 04:00 ",".

    'ESTIMATED_HOURS': 1000.00.

    'ACTUAL_HOURS': 1000.00.

    'OWNER_USER_ID': 1000.00.

    'CREATED_BY': "string",.

    "CREATION_DATE': ' 2009-05 - 16 T 08: 42:28"

    'LAST_UPDATED_BY': "string",.

    'LAST_UPDATE_DATE': ' 2003-08 - 08T 20: 18:37 - 04:00 ",".

    "TaskAssignment": [{}

    'ASSIGNMENT_ID': 1000.00.

    'PROJECT_TEAM_MEMBER_ID': 1000.00.

    "START_DATE": "2012-09 - 13 T 09: 00:34 - 04:00", ".

    "END_DATE": "2009-10 - 14 T 03: 16:36."

    'CREATED_BY': "string",.

    'CREATION_DATE': ' 2010-03 - 18 T 12: 05:32.

    'LAST_UPDATED_BY': "string",.

    "LAST_UPDATE_DATE": "2018-12 - 28 T 14: 51:14 - 05:00", ".

    'FAVORITE_FLAG': "string".

    } ]

    } ]

    }

    Please let me know if I missed all the details.

    Waiting for answer!

    Thank you

    Diprish

    Massari,

    Task.Java seems good. The question is: how to create the new instance of task assignment in the UI?

    That's what you do: you must use the create operation standard of the palette of the title of the collection of nested task assignment data control. Thus, enrich the collection of task, the collection taskAssignment nested in the task, expand the node of the operations and drag and drop the operation of creation on your page. This should add the new instance to the collection of the current task task assignment. To make sure that this is the case, set a breakpoint in the addTaskAssignment method in Task.java. Then, when you save the parent task, load useful json must include a table nested with the new task assignment.

    Steven Davelaar,

    Oracle Mobile A-team.

  • Can someone guide me how disable or disconnect a specific user of WiFi for laptop user and Mobile WiFi user without the user's knowledge.

    Hi, can someone help me to disable a user especially wifi?

    Hello

    Can someone guide me how disable or disconnect a specific user of WiFi for laptop user and Mobile WiFi user without the user's knowledge.

    Because I gave the WiFi setting for the particular user who uses more bandwidth. So, I need to disable his WiFi without his knowledge

    I need help on this

    Thanks in advance

    Waiting for a good and simple suggestion

    Change the WPA2 password on your wireless access point and tell them what it is.

  • How to revoke the SELECT on a table for a specific user?

    Environment:

    SQL * 3.1 on Windows XP Pro SP3 Developer to connect to Oracle 11.2.0.3 EE on Solaris 10.5.

    I have table T with SELECTION privilege granted on this issue both a role and a specific user.

    I am using SQL * Developer to revoke the privilege SELECT on this table of the individual user and leave the role.

    I can see how to revoke the role by right-clicking on the table and goes to the privileges-> revoke but I can't find where to choose a specific user to revoke of.

    Any help is greatly appreciated!

    -gary

    Hi Gary,.

    You are probably aware of the SQL syntax of base to make grant and revoke of SQL * more or the SQL Developer Worksheet:

    grant select on .T to ;
    revoke select on .T from ;
    

    To reach the equivalent to revoking of SQL Developer Connection Navigator...
    1. open the connection for
    2 expand the Tables node, and then open the object for table T browser.
    3. click on the grants tab and then, in its toolbar, select Actions->-> Revoke privileges
    4. Select in the drop-down list of the dialog box to remove user Action.
    5 shuttle privilege SELECT from the right back to the left, and then click apply.

    One would expect to be able to do the same thing from say the node under the node for the use of the SYSTEM for other users, but this isn't the case.

    Hope this helps,
    Gary Graham
    SQL development team

  • Make sure that 'tour windows xp' appear again for a specific user

    When I create a new account, a little balloon appears in the bottom right of the screen next to the notification area that says 'Windows XP Tour'. After awhile, she disappears.

    Is it possible to bring it back and make it stay there all the time? How could I do? There must be a registry setting that keeps track of the amount of time since an account was created or how many connections, so how can I change it to always do this prompt? Can I use an editor hex old-fashioned thus.

    I have an old relative who keeps forgetting basic skills such as how to reduce a window, the use of the taskbar and sometimes forget that the large list of programs are now under 'all programs' (although I solved it using the start menu classic.) I don't know what I'll do when she gets a new machine with Windows 8, since this feature has been removed in 7). I'm tired of always prompting you to go to start-> all programs-> Accessories-> windows XP of the Tower, and I tried to add an icon on the desktop. I want just the reminder it so she can click it before calling me for really basic things I taught him a dozen years with his Windows 98 computer. This seems to happen more frequently, and I noticed that she is 'slide' into other things as well, so I'll try to make up for it.

    P.S. I'm not sure which category I should be put under. I settled on "ease of access" because I try to help and an elderly woman in her late 90s access her computer when she keeps forgetting the basic skills. The tour is... temporarily.

    Hi SlickRBCD,

    If I understand correctly you have a problem with guided tour of Windows XP still appearing on specific users. Do not worry, I'm here to help you with this question.

    Let us try the following steps and check if it works for you.

    1. Start the registry (Regedit.exe) editor.
    2. Locate and click the following key in the registry:
      HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Tour
    3. On the Edit menu, point to new, click Dword value, type RunCount, set the data value 1 (one) and then click OK.
    4. Exit the registry editor.

    Warning: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: http://support.microsoft.com/kb/322756

    Please answer if the steps do not have hepl, so that we could help you better.

  • I can't access the files under a specific user name, no password

    original title: access files

    Received the infamous "blue screen" error  Installed new hard drive and Windows XP Pro.  Installed old drive "blue screen" in a "pregnant" so I could access the files.  Only problem is that I can't access the files under a specific user name, no password.  All of the suggestions.

    In a situation like yours, you need to "Take Ownership" files that you can access on your old disk:

    "How appropriate a file or a folder in Windows XP"
      <>http://support.Microsoft.com/kb/308421 >

    HTH,
    JW

  • How to block Facebook for specific users by IP in NSA 4600 Sonicwall

    Hello

    I want to block facebook and youtube for some users in network using the IP of the user's computer or a MAC and allow other remaining users access facebook normally in Dell Sonicwall NSA 4600.

    Kindly guide me how it is possible in the firewall settings. Thank you

    Osama Aftab.

    You must configure the App control rules advance for block & FB access to specific users.

    Following article will give you heads upward.

    It is said in this article during the configurations block: activate & user/group of users Include: all THE (IE block FB for all users). You can use groups to exclude the user to authorize access to few IPs/users.

  • How to find the list of folders of files owned by a specific user in a shared and its drive path

    Hello people,

    I'm stuck in a situation where I need a list of files & folders belonging to specific user (user is shane and shared path is------Qpmzeul\lis\IM( ) in a shared drive as well as its path.

    I created a file with the command "dir/s/Q \\Qpmzeul\lis\IM>fileslist.csv" .bat and he ran, I got the result but I got the result that includes the same information about other users also that I need, and it is very difficult to filter.

    and then I created the .bat file and used the command DIR/s/Q \\Qpmzeul\lis\IM/S/Q| FIND/i 'shane' > C:\test.csv

    Here, I got the list files and folders owned by user Shane but without path

    Please help me so that I get the path and the results for shane

    Thank you

    Hi Purudharth,

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums:

    http://social.technet.Microsoft.com/forums/en-us/category/w7itpro

  • Assign the PMP license to specific users without TMS

    Hello guys,.

    IM development environment of videoconferencing on my client with this specification:

    -Worm CUCM 11.x

    -Telepresence conductor XC4.0 (only 1)

    -vTelepresence Server ver 4.2 (only 1)

    My problem is im using PMP licenses, no screen. So I really confuse how to assign the license PMP to specific users.

    I already insert the driver's license, like the image below:

    the multiparty license on driver State said: I already have 25 license PMP but assign 0. and he said: if I did a conference call, he used license SMP, so the lack of SMP license error always come. So I need 1 license PMP connection to my user / ext to remove the error warning.

    I can do without TMS?

    If can, please help me with this.

    Thank you all.

    Best regards

    Christophe.

    The recommendation is to use use AD to import users in CUCM and TMSPE to make sure that all the same users are added.  However, you may manually create users in CUCM and TMSPE as long as the details between the two systems are the same, including the address of the video as that will identify the user as long as the host of the CMR.

  • Exclude the specific user to logging of GBA?

    Hello

    .

    My client and I are looking for a way to exclude servers AAA (ACS) for a specific user actions/commands, log if logging continues for other users as AAA clients on devices have been configured with networks:

    .

    AAA accounting-off Ganymede controls +.

    .

    I have found no solution so far, either on the side of the ACS, or on the side controls and aaa IOS.

    .

    (Although it looks like a potential security problem), can someone advise?

    .

    Thank you for your cooperation.

    Yvon.

    Yvon,

    Don't you can't exclude a single user to connect.  Accounting is a global command.

    I guess you probably have a script that generates a large amount of registration data?

    -Jesse

  • How to use cacls to deny a specific user

    I have forgotten how to use cacls since I always use the GUI. However, I got a file with plans for a surprise party in the public record that I realized I didn't tell user to see. I was coordinating with someone else, who use the same computer, hence the need to be in the public record. Says the person was using the computer when I realized this, so I grabbed my laptop and use telnet to connect (try to use the remote desktop on Windows Professional will start the person at the keyboard, unlike Windows Server and I wanted to be discreet). Telnet being limited to the command line, I had to use these tools. I typed the following command:
    Cacls /?
    and then typed
    Cacls filename /d username

    Yet when I tired to access the file later, I found that all security clearances had been wiped out and the only thing there was the user I wanted to deny with a refusal. In fact, even the admin account has been denied permission until I took possession.

    I wanted to let all other permissions alone and just add a deny for the specific user. Previously, he had the same permissions that created everything in the public folder. What I did wrong and what should I do?

    Instead of modify the permission list, you (deleted) has replaced it (that's why you prompt the warning "are you sure?". When you are finished, there is no user in the access list. The /e switch that would have prevented from happening.

  • Define 'My task list' as a home page for a specific user

    Hello

    As long as administrator, I can not put the default homepage to "My list" for a specific user (at the moment of the user's default home page is a blank page and must be 3 steps to get to "My to-do list").

    I know how to change the home page in the connection of the user, but as an administrator, I do not have.

    Can you help me please?

    Thank you

    Margarida

    Johns suggestion will define Tasklist to the default view for the Application, but you can also set the default application a user sees by connecting to the workspace

    go to navigate-> administer-> workspace settings-> manage preferences

    Select the user to whom that you want to change the settings

    Under Default Startup Options, change the content of the Application and select the application you want for this user.

    Click on finish, and the user will see the change next time they connect.

  • How to disable verification for specific user

    Hi all

    On our setting of database audit db is expanded, and verification information was resident on system tablespace.

    For some reason we allow audit to the specific user.

    VERIFICATION BY TOMMY BY ACCESS;

    CHECK DELETE THE TABLE, INSERT TABLE, SELECT THE TABLE, UPDATE TABLE BY TOMMY BY ACCESS;

    AUDIT EXECUTE ANY PROCEDURE OF TOMMY BY ACCESS;

    He wrote too much information and we want to disable this check for tommy. But we want to do without restarting database because our running System 7/24.

    We allow audit for tommy without rebooting, but we can't turn it off without restarting.

    NOAUDIT ALL BY TOMMY;

    NOAUDIT DELETE THE TABLE, INSERT TABLE, SELECT TABLE, TABLE UPDATE BY TOMMY;

    NOAUDIT PERFORM ANY PROCEDURE OF TOMMY;

    There is no error but it steel writes too much information, please help how we can disable it without reboot?

    2790572 wrote:

    Hi all

    On our setting of database audit db is expanded, and verification information was resident on system tablespace.

    For some reason we allow audit to the specific user.

    VERIFICATION BY TOMMY BY ACCESS;

    CHECK DELETE THE TABLE, INSERT TABLE, SELECT THE TABLE, UPDATE TABLE BY TOMMY BY ACCESS;

    AUDIT EXECUTE ANY PROCEDURE OF TOMMY BY ACCESS;

    He wrote too much information and we want to disable this check for tommy. But we want to do without restarting database because our running System 7/24.

    We allow audit for tommy without rebooting, but we can't turn it off without restarting.

    NOAUDIT ALL BY TOMMY;

    NOAUDIT DELETE THE TABLE, INSERT TABLE, SELECT TABLE, TABLE UPDATE BY TOMMY;

    NOAUDIT PERFORM ANY PROCEDURE OF TOMMY;

    There is no error but it steel writes too much information, please help how we can disable it without reboot?

    The change applies only to new sessions opened by TOMMY.

    So at a minimum all existing sessions belonging to TOMMY need to be terminated.

Maybe you are looking for

  • The screen backlight not working anymore on Satellite M

    Hello I have a problem with my laptop screen. The backlight of the screen does not work no matter how suspect more and I switch that turns off the screen when I close my laptop is broken. When I press the power button and release, a fast and light th

  • 2 smart Wifi routers home

    Hi all, new to the forum. I have a House of 3 floors in Spain and its concreate walls and floors marble out. I bought an EA6900 which is connected to the upper floor which is where my antenna is for my internet. At the lower level that I am running a

  • Xperia Z2 video without sound

    Hello My z2 is abour age of 4 weeks. Evey Software and Android is the latest version. the first days I was able to record videos with sound. 3 weeks later, I tried again on great moments in my live and when I went to see the video, the video plays wi

  • Vista starts up

    I have a fairly new laptop that won't boot to the top. The screen remains black and I have a chance to see just the small progress bar, then that's it. I tried the fix auto and the computer says that the issue cannot be fixed in this way. Can I buy w

  • Simulator of BB and calendar applications

    What is the best way to send me an invitation of calendar for the BB Simulator? I have one, but I'm trying to track down WRT calendar applications, but I don't know how I would go about the test...