/**
* ESUP-Portail Helpdesk - Copyright (c) 2004-2009 ESUP-Portail consortium.
*/
package org.esupportail.helpdesk.domain.departmentSelection.conditions;
import org.esupportail.helpdesk.domain.DomainService;
import org.esupportail.helpdesk.domain.beans.User;
/**
* A condition that is matched for specific users.
*/
public class SpecificUserCondition extends AbstractUserCondition {
/**
* The serialization id.
*/
private static final long serialVersionUID = -8980479525839578354L;
/**
* Empty constructor (for Digester).
*/
public SpecificUserCondition() {
super();
}
/**
* @see org.esupportail.helpdesk.domain.departmentSelection.conditions.AbstractUserCondition
* #isMatchedInternal(
* org.esupportail.helpdesk.domain.DomainService, org.esupportail.helpdesk.domain.beans.User)
*/
@Override
protected boolean isMatchedInternal(
final DomainService domainService,
final User user) {
return domainService.getUserStore().isSpecificUser(user);
}
/**
* @see org.esupportail.helpdesk.domain.departmentSelection.conditions.AbstractCondition#checkInternal()
*/
@Override
public void checkInternal() {
// nothing to check here
}
/**
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "<specific-user />";
}
/**
* @see org.esupportail.helpdesk.domain.departmentSelection.conditions.Condition#getNodeType()
*/
@Override
public String getNodeType() {
return "specificUser";
}
}