org.drools.guvnor.server.util
Class AssetLockManager

java.lang.Object
  extended by org.drools.guvnor.server.util.AssetLockManager

@Scope(value=APPLICATION)
@Startup
@Name(value="assetLockManager")
public class AssetLockManager
extends Object

Manages the locks for assets.


Constructor Summary
AssetLockManager()
           
 
Method Summary
 String getAssetLockerUserName(String uuid)
          Return the lockers user name.
static AssetLockManager instance()
           
 boolean isAssetLocked(String uuid)
           
 void lockAsset(String uuid, String userName)
          Locks the asset, if a lock already exists this over writes it.
 void unLockAsset(String uuid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetLockManager

public AssetLockManager()
Method Detail

instance

public static AssetLockManager instance()

isAssetLocked

public boolean isAssetLocked(String uuid)

getAssetLockerUserName

public String getAssetLockerUserName(String uuid)
Return the lockers user name.

Parameters:
uuid - Id of the asset.
Returns:
Lockers user name or null if there is no lock with this uuid.

lockAsset

public void lockAsset(String uuid,
                      String userName)
Locks the asset, if a lock already exists this over writes it.

Parameters:
uuid - Id of the asset.
userName - User name of the user that is locking the asset.

unLockAsset

public void unLockAsset(String uuid)


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.