Re: ERCAuditTrail - Relationship updates.

2013-12-17 Thread Ramsey Gurley
Best way to know is to look at the source. I may be mistaken, but I believe all 
you need to do is add that key to your audit keys dictionary. The only tricky 
bit I’m aware of is that flattened relationships have to use the full key path 
instead. Perhaps the change is being recorded, but on the Category side of the 
relationship?

On Dec 17, 2013, at 7:42 AM, Mark Gowdy  wrote:

> Posted this to the Wonder list (sourceforge), but it didn't appear to come 
> through.  Also, noticed that the activity on that account was quite low too.  
> Is there a problem with it, or is there somewhere new/cool to hangout?
> 
> Hi, 
> 
> The ERCoreBusinessLogic stuff works great when simple values are updated.
> But, what I can't figure out, is how to record changes in relationships 
> between other objects.
> 
> e.g.  Media -->> Category
> 
> Can it do that?
> Am I missing something obvious?
> 
> Cheers, 
> 
> Mark
> 
> On 29 Jun 2012, at 12:31, Dieter Stollorcz wrote:
> 
>> Hi Duc,
>> 
>> here is how i set up ERCAuditTrails and ERCPreference:
>> 
>> 1. Add the ERCoreBusinessLogic to build path
>> 
>> 2. Create the ERCoreBusinessLogic Tables in DB 
>> Run migrations or add the relevant tables to DB
>> 
>> 3. Implement ERCoreUserInterface on user entity ( my UserEntity is 
>> ECOM_Actor)
>> public class ECOM_Actor extends _ECOM_Actor implements ERCoreUserInterface {
>>  ...
>>  public static final String  PreferencesKey = "preferences";
>>  @Override
>>  public NSArray preferences() {
>>  return (NSArray)storedValueForKey(PreferencesKey);
>>  }
>> 
>>  @Override
>>  public void setPreferences(NSArray array) {
>>  takeStoredValueForKey(array.mutableClone(), PreferencesKey);
>> 
>>  }
>> 
>>  @Override
>>  public void newPreference(EOEnterpriseObject pref) {
>>  addObjectToBothSidesOfRelationshipWithKey(pref, PreferencesKey);
>>  }
>> 
>> 
>> 
>> 4. In Application.java add 
>> @Override
>>  public void finishInitialization() {
>>  super.finishInitialization();
>>  
>> ERCoreBusinessLogic.sharedInstance().addPreferenceRelationshipToActorEntity("ECOM_Actor");
>>  }
>>  
>> 5.  Set the user as the actor at login (DirectAction.java)
>> public WOActionResults loginAction() {
>>  ...
>>  ((Session)session()).setCurrentUser(user);
>>  
>> }
>> 
>> 6.  Set the Actor in session.java 
>> public void setCurrentUser(ECOM_Actor user) {
>>  ERCoreBusinessLogic.setActor(user);
>>  _currentUser = user;
>>  }
>>  
>> public void awake() {
>> super.awake();
>> if (currentUser() != null) {
>> ERCoreBusinessLogic.setActor(currentUser());
>> }
>> }
>> 
>> public void sleep() {
>> ERCoreBusinessLogic.setActor(null);
>> super.sleep();
>> }
>> 
>> 7. In EntityModeler add the ERXAuditKeys 
>> Include your list of ERXAuditKeys in the userInfo dictionary for the Entity.
>> If you include the ERXAuditKeys key with an empty value, it will log all 
>> your attributes by default. 
>> 
>> 
>> Dieter
>> 
>> 
>> 
>> 
>> 
>> 
>> Am 29.06.2012 um 08:00 schrieb Duc Thanh Nguyen:
>> 
>>> Hi everyone,
>>> Could you pls share with me some sample code of ERCAuditTrail? I'd love to 
>>> see examples on how to use ERCAuditTrail. Thanks so much.
>>> Bin
>>> --
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and 
>>> threat landscape has changed and how IT managers can respond. Discussions 
>>> will include endpoint security, mobile security and the latest in malware 
>>> threats. 
>>> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
>>> Wonder-disc mailing list
>>> wonder-d...@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc
>> 
>> 
>> 
>> 
>> --
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and 
>> threat landscape has changed and how IT managers can respond. Discussions 
>> will include endpoint security, mobile security and the latest in malware 
>> threats. 
>> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
>> Wonder-disc mailing list
>> wonder-d...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wonder-disc
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
> 
> This email sent to rgur...@smarthealth.com

 

ERCAuditTrail - Relationship updates.

2013-12-17 Thread Mark Gowdy
Posted this to the Wonder list (sourceforge), but it didn't appear to come 
through.  Also, noticed that the activity on that account was quite low too.  
Is there a problem with it, or is there somewhere new/cool to hangout?

Hi, 

The ERCoreBusinessLogic stuff works great when simple values are updated.
But, what I can't figure out, is how to record changes in relationships between 
other objects.

e.g.  Media -->> Category

Can it do that?
Am I missing something obvious?

Cheers, 

Mark

On 29 Jun 2012, at 12:31, Dieter Stollorcz wrote:

> Hi Duc,
> 
> here is how i set up ERCAuditTrails and ERCPreference:
> 
> 1. Add the ERCoreBusinessLogic to build path
> 
> 2. Create the ERCoreBusinessLogic Tables in DB 
> Run migrations or add the relevant tables to DB
> 
> 3. Implement ERCoreUserInterface on user entity ( my UserEntity is ECOM_Actor)
> public class ECOM_Actor extends _ECOM_Actor implements ERCoreUserInterface {
>   ...
>   public static final String  PreferencesKey = "preferences";
>   @Override
>   public NSArray preferences() {
>   return (NSArray)storedValueForKey(PreferencesKey);
>   }
> 
>   @Override
>   public void setPreferences(NSArray array) {
>   takeStoredValueForKey(array.mutableClone(), PreferencesKey);
> 
>   }
> 
>   @Override
>   public void newPreference(EOEnterpriseObject pref) {
>   addObjectToBothSidesOfRelationshipWithKey(pref, PreferencesKey);
>   }
> 
> 
> 
> 4. In Application.java add 
> @Override
>   public void finishInitialization() {
>   super.finishInitialization();
>   
> ERCoreBusinessLogic.sharedInstance().addPreferenceRelationshipToActorEntity("ECOM_Actor");
>   }
>   
> 5.  Set the user as the actor at login (DirectAction.java)
> public WOActionResults loginAction() {
>   ...
>   ((Session)session()).setCurrentUser(user);
>   
> }
> 
> 6.  Set the Actor in session.java 
> public void setCurrentUser(ECOM_Actor user) {
>   ERCoreBusinessLogic.setActor(user);
>   _currentUser = user;
>   }
>   
> public void awake() {
> super.awake();
> if (currentUser() != null) {
> ERCoreBusinessLogic.setActor(currentUser());
> }
> }
> 
> public void sleep() {
> ERCoreBusinessLogic.setActor(null);
> super.sleep();
> }
> 
> 7. In EntityModeler add the ERXAuditKeys 
> Include your list of ERXAuditKeys in the userInfo dictionary for the Entity.
> If you include the ERXAuditKeys key with an empty value, it will log all your 
> attributes by default. 
> 
> 
> Dieter
> 
> 
> 
> 
> 
> 
> Am 29.06.2012 um 08:00 schrieb Duc Thanh Nguyen:
> 
>> Hi everyone,
>> Could you pls share with me some sample code of ERCAuditTrail? I'd love to 
>> see examples on how to use ERCAuditTrail. Thanks so much.
>> Bin
>> --
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and 
>> threat landscape has changed and how IT managers can respond. Discussions 
>> will include endpoint security, mobile security and the latest in malware 
>> threats. 
>> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
>> Wonder-disc mailing list
>> wonder-d...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wonder-disc
> 
> 
> 
> 
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. 
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
> Wonder-disc mailing list
> wonder-d...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wonder-disc


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com