org.eclipse.osgi.internal.permadmin
Class SecurityTableUpdate

java.lang.Object
  extended by org.eclipse.osgi.internal.permadmin.SecurityTableUpdate
All Implemented Interfaces:
ConditionalPermissionUpdate

public class SecurityTableUpdate
extends java.lang.Object
implements ConditionalPermissionUpdate


Constructor Summary
SecurityTableUpdate(SecurityAdmin securityAdmin, SecurityRow[] rows, long timeStamp)
           
 
Method Summary
 boolean commit()
          Commit this update.
 java.util.List getConditionalPermissionInfos()
          This method returns the list of ConditionalPermissionInfos for this update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityTableUpdate

public SecurityTableUpdate(SecurityAdmin securityAdmin,
                           SecurityRow[] rows,
                           long timeStamp)
Method Detail

commit

public boolean commit()
Description copied from interface: ConditionalPermissionUpdate
Commit this update. If no changes have been made to the Conditional Permission Table since this update was created, then this method will replace the Conditional Permission Table with this update's Conditional Permissions. This method may only be successfully called once on this object.

If any of the ConditionalPermissionInfos in the update list has null as a name it will be replaced with a new ConditionalPermissionInfo object that has a generated name which is unique within the list.

No two entries in this update's Conditional Permissions may have the same name. Other consistency checks may also be performed. If this update's Conditional Permissions are determined to be inconsistent in some way then an IllegalStateException will be thrown.

This method returns false if the commit did not occur because the Conditional Permission Table has been modified since the creation of this update.

Specified by:
commit in interface ConditionalPermissionUpdate
Returns:
true if the commit was successful. false if the commit did not occur because the Conditional Permission Table has been modified since the creation of this update.

getConditionalPermissionInfos

public java.util.List getConditionalPermissionInfos()
Description copied from interface: ConditionalPermissionUpdate
This method returns the list of ConditionalPermissionInfos for this update. This list is originally based on the Conditional Permission Table at the time this update was created. The list returned by this method will be replace the Conditional Permission Table if commit is called and is successful.

The delete method of the ConditionalPermissionInfos in the list must throw UnsupportedOperationException.

The list returned by this method is ordered and the most significant table entry is the first entry in the list.

Specified by:
getConditionalPermissionInfos in interface ConditionalPermissionUpdate
Returns:
A List of the ConditionalPermissionInfos which represent the Conditional Permissions maintained by this update. Modifications to this list will not affect the Conditional Permission Table until successfully committed. The list may be empty if the Conditional Permission Table was empty when this update was created.


Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.