1,5 → 1,8 |
package ak.hostcaptain.core.model; |
|
import ak.hostcaptain.util.ModelException; |
import ak.hostcaptain.util.ModelSecurityException; |
|
/** |
* |
* @hibernate.class table="domains" |
24,7 → 27,7 |
return id; |
} |
|
public void setId(Long id) |
protected void setId(Long id) |
{ |
this.id = id; |
} |
38,11 → 41,20 |
return name; |
} |
|
public void setName(String name) |
protected void setName(String name) |
{ |
this.name = name; |
} |
|
public void setName(User editor, String name) |
throws ModelException |
{ |
if(!editableBy(editor)) |
throw new ModelSecurityException(); |
|
this.name = name; |
} |
|
/** |
* |
* @hibernate.many-to-one |
52,11 → 64,20 |
return owner; |
} |
|
public void setOwner(User owner) |
protected void setOwner(User owner) |
{ |
this.owner = owner; |
} |
|
public void setOwner(User editor, User owner) |
throws ModelException |
{ |
if(!editableBy(editor)) |
throw new ModelSecurityException(); |
|
this.owner = owner; |
} |
|
public String getTypeKey() |
{ |
return ak.hostcaptain.core.CoreResources.TYPE_DOMAIN; |
86,4 → 107,10 |
{ |
return user.isSuperuser(); |
} |
|
protected static boolean allowedToCreate(InetDomainManager manager, User editor) |
throws ModelException |
{ |
return editor.isSuperuser(); |
} |
} |