org.apache.cocoon.components.source.helpers
Class SourceLock

java.lang.Object
  extended by org.apache.cocoon.components.source.helpers.SourceLock

public class SourceLock
extends Object

This interface for lock of a source

Version:
CVS $Id: SourceLock.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Stephan Michels

Constructor Summary
SourceLock(String subject, String type, Date expiration, boolean inheritable, boolean exclusive)
          Creates a new lock for a source
 
Method Summary
 Date getExpiration()
          Returns the expiration date
 String getSubject()
          return the subject of the lock
 String getType()
          Return ths type of the lock
 boolean isExclusive()
          Returns the exclusive flag
 boolean isInheritable()
          Returns the inheritable flag
 void setExclusive(boolean exclusive)
          Sets the exclusive flag
 void setExpiration(Date expiration)
          Set the expiration date
 void setInheritable(boolean inheritable)
          Sets the inheritable flag
 void setSubject(String subject)
          Sets the subject for this lock
 void setType(String type)
          Sets the type of the lock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceLock

public SourceLock(String subject,
                  String type,
                  Date expiration,
                  boolean inheritable,
                  boolean exclusive)
Creates a new lock for a source

Parameters:
subject - Which user should be locked
type - Type of lock
expiration - When the lock expires
inheritable - If the lock is inheritable
exclusive - If the lock is exclusive
Method Detail

setSubject

public void setSubject(String subject)
Sets the subject for this lock

Parameters:
subject - Which user should be locked

getSubject

public String getSubject()
return the subject of the lock

Returns:
Which user should be locked

setType

public void setType(String type)
Sets the type of the lock

Parameters:
type - Type of lock

getType

public String getType()
Return ths type of the lock

Returns:
Type of lock

setExpiration

public void setExpiration(Date expiration)
Set the expiration date

Parameters:
expiration - Expiration date

getExpiration

public Date getExpiration()
Returns the expiration date

Returns:
Expiration date

setInheritable

public void setInheritable(boolean inheritable)
Sets the inheritable flag

Parameters:
inheritable - If the lock is inheritable

isInheritable

public boolean isInheritable()
Returns the inheritable flag

Returns:
If the lock is inheritable

setExclusive

public void setExclusive(boolean exclusive)
Sets the exclusive flag

Parameters:
exclusive - If the lock is exclusive

isExclusive

public boolean isExclusive()
Returns the exclusive flag

Returns:
If the lock is exclusive


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.