/sun/hostcaptain/trunk/bin/find_fixme.sh |
---|
0,0 → 1,4 |
#!/bin/sh |
find . -not -path '*/.svn/*' -type f -exec grep -HE '[F]IXME' {} \; |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/sun/hostcaptain/trunk/webapp/system/login.jsp |
---|
19,7 → 19,7 |
<html:form action="/system/login/submit" focus="username"> |
<backpath:current /> |
<table border="0"> |
<table border=1> |
<tr> |
<th class="right"> |
<bean:message key="ak.hostcaptain.page.system.login.login" /> |
/sun/hostcaptain/trunk/webapp/WEB-INF/hostcaptain-core.tld |
---|
97,7 → 97,60 |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
</tag> |
<tag> |
<name>write</name> |
<tagclass>ak.hostcaptain.core.taglib.WriteTag</tagclass> |
<bodycontent>empty</bodycontent> |
<attribute> |
<name>bundle</name> |
<required>false</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
<attribute> |
<name>filter</name> |
<required>false</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
<attribute> |
<name>format</name> |
<required>false</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
<attribute> |
<name>formatKey</name> |
<required>false</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
<attribute> |
<name>ignore</name> |
<required>false</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
<attribute> |
<name>locale</name> |
<required>false</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
<attribute> |
<name>name</name> |
<required>true</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
<attribute> |
<name>property</name> |
<required>false</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
<attribute> |
<name>scope</name> |
<required>false</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
<attribute> |
<name>default</name> |
<required>false</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
</tag> |
</taglib> |
/sun/hostcaptain/trunk/webapp/WEB-INF/validation.xml |
---|
125,16 → 125,11 |
<field property="id" depends="long"> |
<msg name="long" key="ak.hostcaptain.core.mail.alias.edit.id.wrong" /> |
</field> |
<field property="address" depends="required"> |
<msg name="required" key="ak.hostcaptain.core.mail.alias.edit.address.empty" /> |
</field> |
<field property="domain" depends="required,long"> |
<field property="domain" depends="long"> |
<msg name="long" key="ak.hostcaptain.core.mail.alias.edit.domain.wrong" /> |
<msg name="required" key="ak.hostcaptain.core.mail.alias.edit.domain.wrong" /> |
</field> |
<field property="owner" depends="required,long"> |
<field property="owner" depends="long"> |
<msg name="long" key="ak.hostcaptain.core.mail.alias.edit.owner.wrong" /> |
<msg name="required" key="ak.hostcaptain.core.mail.alias.edit.owner.wrong" /> |
</field> |
</form> |
</formset> |
/sun/hostcaptain/trunk/webapp/domain/edit.jsp |
---|
21,28 → 21,36 |
<backpath:current /> |
<html:hidden property="id" /> |
<bean:message key="ak.hostcaptain.page.domain.edit.name" />: |
<html:text property="name" /> |
<br> |
<bean:message key="ak.hostcaptain.page.domain.edit.owner" />: |
<table border=1> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.domain.edit.name" /></th> |
<td><html:text property="name" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.domain.edit.owner" /></th> |
<td> |
<html:select property="owner"> |
<html:option value="" key="ak.hostcaptain.page.domain.edit.owner.empty"/> |
<html:options collection="users" property="id" labelProperty="login" /> |
</html:select> |
<br> |
<html:checkbox property="enabled" /> |
<bean:message key="ak.hostcaptain.page.domain.edit.enabled" /> |
<br> |
<bean:message key="ak.hostcaptain.page.domain.edit.comment" />: |
<html:textarea property="comment" /> |
<br> |
</td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.domain.edit.enabled" /></th> |
<td><html:checkbox property="enabled" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.domain.edit.comment" /></th> |
<td><html:textarea property="comment" /></td> |
</tr> |
<tr> |
<td colspan=2> |
<html:submit><bean:message key="ak.hostcaptain.page.domain.edit.submit" /></html:submit> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.domain.edit.back" /></backpath:backlink> |
</td> |
</tr> |
</table> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.domain.edit.back" /></backpath:backlink> |
</html:form> |
</body> |
/sun/hostcaptain/trunk/webapp/user/password/change.jsp |
---|
20,40 → 20,38 |
<html:form action="/user/password/submit" focus="oldpassword"> |
<backpath:current/> |
<table border="0"> |
<table border=1> |
<tr> |
<th class="right"> |
<th> |
<bean:message key="ak.hostcaptain.page.user.password.change.old_password" /> |
</th> |
<td class="left"> |
<td> |
<html:password property="oldpassword" size="16" redisplay="false" /> |
</td> |
</tr> |
<tr> |
<th class="right"> |
<th> |
<bean:message key="ak.hostcaptain.page.user.password.change.new_password" /> |
</th> |
<td class="left"> |
<td> |
<html:password property="password" size="16" redisplay="false" /> |
</td> |
</tr> |
<tr> |
<th class="right"> |
<th> |
<bean:message key="ak.hostcaptain.page.user.password.change.new_password_again" /> |
</th> |
<td class="left"> |
<td> |
<html:password property="password2" size="16" redisplay="false" /> |
</td> |
</tr> |
<tr> |
<td class="right"> |
<td colspan=2> |
<html:submit> |
<bean:message key="ak.hostcaptain.page.user.password.change.submit" /> |
</html:submit> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.user.password.change.back" /></backpath:backlink> |
</td> |
<td class="right"> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.user.password.change.cancel" /></backpath:backlink> |
</td> |
</tr> |
</table> |
</html:form> |
/sun/hostcaptain/trunk/webapp/user/system/list.jsp |
---|
17,7 → 17,7 |
<html:errors/> |
<table> |
<table border=1> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.system.list.uid" /></th> |
<th><bean:message key="ak.hostcaptain.page.user.system.list.name" /></th> |
35,6 → 35,9 |
<logic:present name="u" property="owner"> |
<bean:write name="u" property="owner.login" /> |
</logic:present> |
<logic:notPresent name="u" property="owner"> |
|
</logic:notPresent> |
</td> |
<td> |
<logic:equal name="u" property="enabled" value="true">x</logic:equal> |
/sun/hostcaptain/trunk/webapp/user/system/edit.jsp |
---|
21,32 → 21,40 |
<backpath:current /> |
<html:hidden property="id" /> |
<bean:message key="ak.hostcaptain.page.user.system.edit.uid" />: |
<html:text property="uid" /> |
<br> |
<bean:message key="ak.hostcaptain.page.user.system.edit.name" />: |
<html:text property="name" /> |
<br> |
<bean:message key="ak.hostcaptain.page.user.system.edit.owner" />: |
<table border=1> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.system.edit.uid" /></th> |
<td><html:text property="uid" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.system.edit.name" /></th> |
<td><html:text property="name" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.system.edit.owner" /></th> |
<td> |
<html:select property="owner"> |
<html:option value="" key="ak.hostcaptain.page.user.system.edit.owner.empty"/> |
<html:options collection="users" property="id" labelProperty="login" /> |
</html:select> |
<br> |
<html:checkbox property="enabled" /> |
<bean:message key="ak.hostcaptain.page.user.system.edit.enabled" /> |
<br> |
<bean:message key="ak.hostcaptain.page.user.system.edit.comment" />: |
<html:textarea property="comment" /> |
<br> |
</td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.system.edit.enabled" /></th> |
<td><html:checkbox property="enabled" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.system.edit.comment" /></th> |
<td><html:textarea property="comment" /></td> |
</tr> |
<tr> |
<td colspan=2> |
<html:submit><bean:message key="ak.hostcaptain.page.user.system.edit.submit" /></html:submit> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.user.system.edit.back" /></backpath:backlink> |
</td> |
</tr> |
</table> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.user.system.edit.back" /></backpath:backlink> |
</html:form> |
</body> |
/sun/hostcaptain/trunk/webapp/user/list.jsp |
---|
17,7 → 17,7 |
<html:errors/> |
<table> |
<table border=1> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.list.login" /></th> |
<th><bean:message key="ak.hostcaptain.page.user.list.boss" /></th> |
34,6 → 34,9 |
<logic:present name="u" property="boss"> |
<bean:write name="u" property="boss.login" /> |
</logic:present> |
<logic:notPresent name="u" property="boss"> |
|
</logic:notPresent> |
</td> |
<td> |
<logic:equal name="u" property="superuser" value="true">x</logic:equal> |
/sun/hostcaptain/trunk/webapp/user/edit.jsp |
---|
21,41 → 21,49 |
<backpath:current /> |
<html:hidden property="id" /> |
<bean:message key="ak.hostcaptain.page.user.edit.login" />: |
<html:text property="login" /> |
<br> |
<bean:message key="ak.hostcaptain.page.user.edit.password" />: |
<html:password property="password" redisplay="false" /> |
<br> |
<bean:message key="ak.hostcaptain.page.user.edit.password_again" />: |
<html:password property="password2" redisplay="false" /> |
<br> |
<bean:message key="ak.hostcaptain.page.user.edit.boss" />: |
<table border=1> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.edit.login" /></th> |
<td><html:text property="login" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.edit.password" /></th> |
<td><html:password property="password" redisplay="false" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.edit.password_again" /></th> |
<td><html:password property="password2" redisplay="false" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.edit.boss" /></th> |
<td> |
<html:select property="boss"> |
<html:option value="" key="ak.hostcaptain.page.user.edit.boss.empty"/> |
<core:options collection="users" property="id" /> |
</html:select> |
<br> |
<html:checkbox property="superuser" /> |
<bean:message key="ak.hostcaptain.page.user.edit.superuser" /> |
FIXME: don't show this checkbox for editor itself |
<br> |
<html:checkbox property="enabled" /> |
<bean:message key="ak.hostcaptain.page.user.edit.enabled" /> |
<br> |
<bean:message key="ak.hostcaptain.page.user.edit.comment" />: |
<html:textarea property="comment" /> |
<br> |
</td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.edit.superuser" /></th> |
<td><html:checkbox property="superuser" /> |
FIXME: don't show this checkbox for editor itself</td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.edit.enabled" /></th> |
<td><html:checkbox property="enabled" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.user.edit.comment" /></th> |
<td><html:textarea property="comment" /></td> |
</tr> |
<tr> |
<td colspan=2> |
<html:submit><bean:message key="ak.hostcaptain.page.user.edit.submit" /></html:submit> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.user.edit.back" /></backpath:backlink> |
</td> |
</tr> |
</table> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.user.edit.back" /></backpath:backlink> |
</html:form> |
</body> |
/sun/hostcaptain/trunk/webapp/mail/box/edit.jsp |
---|
21,61 → 21,73 |
<backpath:current /> |
<html:hidden property="id" /> |
<bean:message key="ak.hostcaptain.page.mail.box.edit.login" />: |
<html:text property="login" /> |
<br> |
FIXME: checkbox to get password from owner |
<br> |
<bean:message key="ak.hostcaptain.page.mail.box.edit.password" />: |
<html:password property="password" redisplay="false" /> |
<br> |
<bean:message key="ak.hostcaptain.page.mail.box.edit.password_again" />: |
<html:password property="password2" redisplay="false" /> |
<br> |
<bean:message key="ak.hostcaptain.page.mail.box.edit.domain" />: |
<table border=1> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.edit.login" /></th> |
<td><html:text property="login" /></td> |
</tr> |
<tr> |
<td colspan=2>FIXME: checkbox to get password from owner</td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.edit.password" /></th> |
<td><html:password property="password" redisplay="false" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.edit.password_again" /></th> |
<td><html:password property="password2" redisplay="false" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.edit.domain" /></th> |
<td> |
<html:select property="domain"> |
<html:option value="" key="ak.hostcaptain.page.mail.box.edit.domain.empty"/> |
<html:options collection="domains" property="id" labelProperty="name" /> |
</html:select> |
<br> |
<bean:message key="ak.hostcaptain.page.mail.box.edit.owner" />: |
</td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.edit.owner" /></th> |
<td> |
<html:select property="owner"> |
<html:option value="" key="ak.hostcaptain.page.mail.box.edit.owner.empty"/> |
<html:options collection="users" property="id" labelProperty="login" /> |
</html:select> |
<br> |
<bean:message key="ak.hostcaptain.page.mail.box.edit.systemuser" />: |
</td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.edit.systemuser" /></th> |
<td> |
<html:select property="systemuser"> |
<html:option value="" key="ak.hostcaptain.page.mail.box.edit.systemuser.empty"/> |
<core:options collection="systemusers" property="id" /> |
</html:select> |
<br> |
<html:checkbox property="viruscheck" /> |
<bean:message key="ak.hostcaptain.page.mail.box.edit.viruscheck" /> |
<br> |
<html:checkbox property="spamcheck" /> |
<bean:message key="ak.hostcaptain.page.mail.box.edit.spamcheck" /> |
<br> |
<html:checkbox property="enabled" /> |
<bean:message key="ak.hostcaptain.page.mail.box.edit.enabled" /> |
<br> |
<bean:message key="ak.hostcaptain.page.mail.box.edit.comment" />: |
<html:textarea property="comment" /> |
<br> |
</td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.edit.viruscheck" /></th> |
<td><html:checkbox property="viruscheck" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.edit.spamcheck" /></th> |
<td><html:checkbox property="spamcheck" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.edit.enabled" /></th> |
<td><html:checkbox property="enabled" /></td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.edit.comment" /></th> |
<td><html:textarea property="comment" /></td> |
</tr> |
<tr> |
<td colspan=2> |
<html:submit><bean:message key="ak.hostcaptain.page.mail.box.edit.submit" /></html:submit> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.mail.box.edit.back" /></backpath:backlink> |
</td> |
</tr> |
</table> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.mail.box.edit.back" /></backpath:backlink> |
</html:form> |
</body> |
/sun/hostcaptain/trunk/webapp/mail/box/list.jsp |
---|
17,7 → 17,7 |
<html:errors/> |
<table> |
<table border=1> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.box.list.login" /></th> |
<th><bean:message key="ak.hostcaptain.page.mail.box.list.domain" /></th> |
24,6 → 24,7 |
<th><bean:message key="ak.hostcaptain.page.mail.box.list.owner" /></th> |
<th><bean:message key="ak.hostcaptain.page.mail.box.list.enabled" /></th> |
<th> </th> |
<th> </th> |
</tr> |
<logic:iterate name="mailboxes" id="mailbox"> |
/sun/hostcaptain/trunk/webapp/mail/alias/list.jsp |
---|
17,7 → 17,7 |
<html:errors/> |
<table> |
<table border=1> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.list.alias" /></th> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.list.domain" /></th> |
/sun/hostcaptain/trunk/webapp/mail/alias/edit.jsp |
---|
67,38 → 67,58 |
<backpath:current/> |
<html:hidden property="id" /> |
<p> |
<bean:message key="ak.hostcaptain.page.mail.alias.edit.address" />: |
<html:text property="address" /> |
<br> |
<bean:message key="ak.hostcaptain.page.mail.alias.edit.domain" />: |
<table border=1> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.edit.address" /></th> |
<td><html:text property="address" /></td> |
<td> </td> |
<td> </td> |
<td> </td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.edit.domain" /></th> |
<td> |
<html:select property="domain"> |
<html:option value="" key="ak.hostcaptain.page.mail.alias.edit.domain.empty"/> |
<html:options collection="domains" property="id" labelProperty="name" /> |
</html:select> |
<br> |
<bean:message key="ak.hostcaptain.page.mail.alias.edit.owner" />: |
</td> |
<td> </td> |
<td> </td> |
<td> </td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.edit.owner" /></th> |
<td> |
<html:select property="owner"> |
<html:option value="" key="ak.hostcaptain.page.mail.alias.edit.owner.empty"/> |
<html:options collection="users" property="id" labelProperty="login" /> |
</html:select> |
<br> |
</td> |
<td> </td> |
<td> </td> |
<td> </td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.edit.enabled" /></th> |
<td><html:checkbox property="enabled" /></td> |
<td> </td> |
<td> </td> |
<td> </td> |
</tr> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.edit.comment" /></th> |
<td><html:textarea property="comment" /></td> |
<td> </td> |
<td> </td> |
<td> </td> |
</tr> |
<html:checkbox property="enabled" /> |
<bean:message key="ak.hostcaptain.page.mail.alias.edit.enabled" /> |
<br> |
<bean:message key="ak.hostcaptain.page.mail.alias.edit.comment" />: |
<html:textarea property="comment" /> |
<br> |
</p> |
<table> |
<tr> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.edit.header.tomailbox" /></th> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.edit.header.toexternal" /></th> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.edit.header.enabled" /></th> |
<th><bean:message key="ak.hostcaptain.page.mail.alias.edit.header.comment" /></th> |
<th> </th> |
</tr> |
112,17 → 132,19 |
</html:select> |
</td> |
<td><html:text name="dests" property="email" indexed="true" /></td> |
<td><html:checkbox name="dests" property="enabled" indexed="true" /></td> |
<td><html:text name="dests" property="comment" indexed="true" /></td> |
<td><html:submit property="delete.dests" indexed="true"><bean:message key="ak.hostcaptain.page.mail.alias.edit.delete" /></html:submit></td> |
</tr> |
</logic:iterate> |
<tr> |
<td colspan=3><html:submit property="add"><bean:message key="ak.hostcaptain.page.mail.alias.edit.add" /></html:submit></td> |
<td colspan=5><html:submit property="add"><bean:message key="ak.hostcaptain.page.mail.alias.edit.add" /></html:submit></td> |
<tr> |
</tr> |
<td colspan=3> |
<td colspan=5> |
<html:submit property="submit"><bean:message key="ak.hostcaptain.page.mail.alias.edit.submit" /></html:submit> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.mail.alias.edit.cancel" /></backpath:backlink> |
<backpath:backlink><bean:message key="ak.hostcaptain.page.mail.alias.edit.back" /></backpath:backlink> |
</td> |
</tr> |
</table> |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/form/MailAliasDestBean.java |
---|
8,6 → 8,8 |
private String id; |
private String mailbox; |
private String email; |
private Boolean enabled; |
private String comment; |
public MailAliasDestBean() |
{ |
19,6 → 21,8 |
this.mailbox = (dest.getMailbox() == null) |
? null : StringConverter.toString(dest.getMailbox().getId()); |
this.email = dest.getEmail(); |
this.enabled = dest.getEnabled(); |
this.comment = dest.getComment(); |
} |
public String getId() |
50,4 → 54,24 |
{ |
this.email = email; |
} |
public Boolean getEnabled() |
{ |
return enabled; |
} |
public void setEnabled(Boolean enabled) |
{ |
this.enabled = enabled; |
} |
public String getComment() |
{ |
return comment; |
} |
public void setComment(String comment) |
{ |
this.comment = comment; |
} |
} |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/InetDomainAction.java |
---|
35,7 → 35,8 |
throws Exception |
{ |
if("submit".equals(mapping.getParameter())) { |
initUserList(request); |
User user = (User)request.getSession().getAttribute("user"); |
initUserList(request, user); |
} |
} |
72,7 → 73,7 |
showForm.set("comment", domain.getComment()); |
} |
initUserList(request); |
initUserList(request, user); |
return mapping.findForward("default"); |
} |
else if("delete".equals(mapping.getParameter())) { |
97,7 → 98,7 |
} |
domain.setName((String)theForm.get("name")); |
domain.setOwner(UserManager.getInstance().get( |
domain.setOwner(UserManager.getInstance().get(user, |
StringConverter.parseLong(theForm.get("owner")))); |
domain.setEnabled((Boolean)theForm.get("enabled")); |
112,10 → 113,10 |
} |
} |
private void initUserList(HttpServletRequest request) |
private void initUserList(HttpServletRequest request, User user) |
throws Exception |
{ |
List list = new ArrayList(UserManager.getInstance().listUsers()); |
List list = new ArrayList(UserManager.getInstance().listUsers(user)); |
Collections.sort(list, UserManager.LOGIN_COMPARATOR); |
request.setAttribute("users", list); |
} |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/ChangePasswordAction.java |
---|
35,7 → 35,7 |
if(user.checkPassword((String)theForm.get("oldpassword"))) { |
user.setNewPassword((String)theForm.get("password")); |
UserManager.getInstance().save(user); |
UserManager.getInstance().save(user, user); // FIXME: allow user to change own password |
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl()); |
return null; |
} |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/MailboxAction.java |
---|
21,6 → 21,8 |
import ak.backpath.BackPath; |
import ak.hostcaptain.util.StringConverter; |
import ak.hostcaptain.util.UserException; |
import ak.hostcaptain.core.CoreResources; |
import ak.hostcaptain.core.model.User; |
import ak.hostcaptain.core.model.UserManager; |
import ak.hostcaptain.core.model.Mailbox; |
64,6 → 66,8 |
if(boxId == null) { |
showForm.set("enabled", new Boolean(true)); |
showForm.set("viruscheck", new Boolean(true)); |
showForm.set("spamcheck", new Boolean(true)); |
} |
else { |
Mailbox mailbox = MailboxManager.getInstance().get(user, boxId); |
100,7 → 104,7 |
if(boxId == null) { |
if(password == null || password.equals("")) |
throw new Exception("empty password"); // FIXME: exception type and message? |
throw new UserException(CoreResources.PASSWORD_REQUIRED); |
mailbox = MailboxManager.getInstance().create(user); |
113,7 → 117,7 |
mailbox.setLogin((String)theForm.get("login")); |
mailbox.setDomain(InetDomainManager.getInstance().get(user, |
StringConverter.parseLong(theForm.get("domain")))); |
mailbox.setOwner(UserManager.getInstance().get( |
mailbox.setOwner(UserManager.getInstance().get(user, |
StringConverter.parseLong(theForm.get("owner")))); |
mailbox.setVirusCheck((Boolean)theForm.get("viruscheck")); |
mailbox.setSpamCheck((Boolean)theForm.get("spamcheck")); |
144,7 → 148,7 |
private void initLists(HttpServletRequest request, User user) |
throws Exception |
{ |
List users = new ArrayList(UserManager.getInstance().listUsers()); |
List users = new ArrayList(UserManager.getInstance().listUsers(user)); |
Collections.sort(users, UserManager.LOGIN_COMPARATOR); |
request.setAttribute("users", users); |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/MailAliasAction.java |
---|
24,6 → 24,7 |
import ak.backpath.BackPath; |
import ak.hostcaptain.util.StringConverter; |
import ak.hostcaptain.util.UserException; |
import ak.hostcaptain.core.model.User; |
import ak.hostcaptain.core.model.UserManager; |
import ak.hostcaptain.core.model.Mailbox; |
116,6 → 117,17 |
// submit |
if(request.getParameter("submit") != null) { |
// FIXME: if empty element of select box is active, it will be changed |
// by submit |
// validate required fields, because it cannot be done in general case |
if(StringConverter.isEmpty(theForm.get("address"))) |
throw new UserException("ak.hostcaptain.core.mail.alias.edit.address.empty"); |
if(StringConverter.isEmpty(theForm.get("domain"))) |
throw new UserException("ak.hostcaptain.core.mail.alias.edit.domain.wrong"); |
if(StringConverter.isEmpty(theForm.get("owner"))) |
throw new UserException("ak.hostcaptain.core.mail.alias.edit.owner.wrong"); |
if(alias == null) |
alias = MailAliasManager.getInstance().create(user); |
133,9 → 145,9 |
Long mailboxId = StringConverter.parseLong(dests[i].getMailbox()); |
MailAliasDestination dest; |
if(destId == null) |
dest = MailAliasDestinationManager.getInstance().create(); |
dest = MailAliasDestinationManager.getInstance().create(user); |
else |
dest = MailAliasDestinationManager.getInstance().get(destId); |
dest = MailAliasDestinationManager.getInstance().get(user, destId); |
// set mailbox or email |
if(mailboxId != null) { |
147,6 → 159,9 |
dest.setEmail(dests[i].getEmail()); |
} |
dest.setEnabled(dests[i].getEnabled()); |
dest.setComment(dests[i].getComment()); |
// connect |
dest.setAlias(alias); |
alias.getDestinations().add(dest); |
155,7 → 170,7 |
alias.setAddress((String)theForm.get("address")); |
alias.setDomain(InetDomainManager.getInstance().get(user, |
StringConverter.parseLong(theForm.get("domain")))); |
alias.setOwner(UserManager.getInstance().get( |
alias.setOwner(UserManager.getInstance().get(user, |
StringConverter.parseLong(theForm.get("owner")))); |
alias.setEnabled((Boolean)theForm.get("enabled")); |
alias.setComment((String)theForm.get("comment")); |
169,9 → 184,13 |
// add |
else if(request.getParameter("add") != null) { |
// FIXME: if called when no entries defined two rows are created |
MailAliasDestBean[] newDests = new MailAliasDestBean[dests.length+1]; |
if(dests.length > 0) |
System.arraycopy(dests, 0, newDests, 0, dests.length); |
newDests[dests.length] = new MailAliasDestBean(); |
newDests[dests.length].setEnabled(new Boolean(true)); |
theForm.set("dests", newDests); |
initLists(request, user); |
192,11 → 211,6 |
if(n < 0 || n >= dests.length) break; |
MailAliasDestBean[] newDests; |
if(dests.length <= 1) { |
newDests = new MailAliasDestBean[1]; |
newDests[0] = new MailAliasDestBean(); |
} |
else { |
newDests = new MailAliasDestBean[dests.length-1]; |
if(n > 0) |
System.arraycopy(dests, 0, newDests, 0, n); |
203,9 → 217,7 |
if(n < dests.length-1) |
System.arraycopy(dests, n+1, newDests, |
n, dests.length-n-1); |
} |
theForm.set("dests", newDests); |
break; |
} |
catch(NumberFormatException ex) { |
231,7 → 243,7 |
Collections.sort(mailboxes, MailboxManager.LOGIN_COMPARATOR); |
request.setAttribute("mailboxes", mailboxes); |
List users = new ArrayList(UserManager.getInstance().listUsers()); |
List users = new ArrayList(UserManager.getInstance().listUsers(user)); |
Collections.sort(users, UserManager.LOGIN_COMPARATOR); |
request.setAttribute("users", users); |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/UserAction.java |
---|
35,7 → 35,8 |
throws Exception |
{ |
if("submit".equals(mapping.getParameter())) { |
initUserList(request); |
User user = (User)request.getSession().getAttribute("user"); |
initUserList(request, user); |
} |
} |
46,7 → 47,7 |
User user = (User)request.getSession().getAttribute("user"); |
if("list".equals(mapping.getParameter())) { |
List list = new ArrayList(UserManager.getInstance().listUsers()); |
List list = new ArrayList(UserManager.getInstance().listUsers(user)); |
Collections.sort(list, UserManager.LOGIN_COMPARATOR); |
request.setAttribute("users", list); |
62,7 → 63,7 |
showForm.set("enabled", new Boolean(true)); |
} |
else { |
User u = UserManager.getInstance().get(userId); |
User u = UserManager.getInstance().get(user, userId); |
showForm.set("login", u.getLogin()); |
if(u.getBoss() != null) |
showForm.set("boss", StringConverter.toString(u.getBoss().getId())); |
71,13 → 72,13 |
showForm.set("comment", u.getComment()); |
} |
initUserList(request); |
initUserList(request, user); |
return mapping.findForward("default"); |
} |
else if("delete".equals(mapping.getParameter())) { |
DynaActionForm theForm = (DynaActionForm)form; |
Long userId = StringConverter.parseLong(theForm.get("id")); |
User u = UserManager.getInstance().get(userId); |
User u = UserManager.getInstance().get(user, userId); |
if(u.equals(user)) |
throw new UserException(CoreResources.DELETE_ME_SELF); |
85,7 → 86,7 |
// FIXME: invalidate session of deleted user if it is logged in |
// FIXME: if two admins delete each other at the same time |
UserManager.getInstance().delete(u); |
UserManager.getInstance().delete(user, u); |
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl()); |
return null; |
} |
99,10 → 100,10 |
if(password == null || password.equals("")) |
throw new UserException(CoreResources.PASSWORD_REQUIRED); |
u = UserManager.getInstance().create(); |
u = UserManager.getInstance().create(user); |
} |
else { |
u = UserManager.getInstance().get(userId); |
u = UserManager.getInstance().get(user, userId); |
} |
u.setLogin((String)theForm.get("login")); |
111,7 → 112,7 |
if(bossId == null) |
u.setBoss(null); |
else |
u.setBoss(UserManager.getInstance().get(bossId)); |
u.setBoss(UserManager.getInstance().get(user, bossId)); |
if(!user.equals(u)) // do not allow user to change own superuser status |
u.setSuperuser((Boolean)theForm.get("superuser")); |
122,7 → 123,7 |
u.setEnabled((Boolean)theForm.get("enabled")); |
u.setComment((String)theForm.get("comment")); |
UserManager.getInstance().save(u); |
UserManager.getInstance().save(user, u); |
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl()); |
return null; |
} |
131,10 → 132,10 |
} |
} |
private void initUserList(HttpServletRequest request) |
private void initUserList(HttpServletRequest request, User user) |
throws Exception |
{ |
List list = new ArrayList(UserManager.getInstance().listUsers()); |
List list = new ArrayList(UserManager.getInstance().listUsers(user)); |
Collections.sort(list, UserManager.LOGIN_COMPARATOR); |
request.setAttribute("users", list); |
} |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/SystemUserAction.java |
---|
35,7 → 35,8 |
throws Exception |
{ |
if("submit".equals(mapping.getParameter())) { |
initUserList(request); |
User user = (User)request.getSession().getAttribute("user"); |
initUserList(request, user); |
} |
} |
73,7 → 74,7 |
showForm.set("comment", u.getComment()); |
} |
initUserList(request); |
initUserList(request, user); |
return mapping.findForward("default"); |
} |
else if("delete".equals(mapping.getParameter())) { |
104,7 → 105,7 |
if(ownerId == null) |
u.setOwner(null); |
else |
u.setOwner(UserManager.getInstance().get(ownerId)); |
u.setOwner(UserManager.getInstance().get(user, ownerId)); |
u.setEnabled((Boolean)theForm.get("enabled")); |
u.setComment((String)theForm.get("comment")); |
118,10 → 119,10 |
} |
} |
private void initUserList(HttpServletRequest request) |
private void initUserList(HttpServletRequest request, User user) |
throws Exception |
{ |
List list = new ArrayList(UserManager.getInstance().listUsers()); |
List list = new ArrayList(UserManager.getInstance().listUsers(user)); |
Collections.sort(list, UserManager.LOGIN_COMPARATOR); |
request.setAttribute("users", list); |
} |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/CoreResources.properties |
---|
83,8 → 83,8 |
ak.hostcaptain.page.user.password.change.old_password=Old password |
ak.hostcaptain.page.user.password.change.new_password=New password |
ak.hostcaptain.page.user.password.change.new_password_again=New password again |
ak.hostcaptain.page.user.password.change.submit=Change |
ak.hostcaptain.page.user.password.change.cancel=Cancel |
ak.hostcaptain.page.user.password.change.submit=submit |
ak.hostcaptain.page.user.password.change.back=back |
ak.hostcaptain.page.user.list.title=hostcaptain - users - list |
ak.hostcaptain.page.user.list.login=Login |
149,33 → 149,6 |
ak.hostcaptain.page.domain.edit.submit=submit |
ak.hostcaptain.page.domain.edit.back=back |
ak.hostcaptain.page.mail.alias.list.title=hostcaptain - mail aliases - list |
ak.hostcaptain.page.mail.alias.list.alias=Alias |
ak.hostcaptain.page.mail.alias.list.domain=Domain |
ak.hostcaptain.page.mail.alias.list.owner=Owner |
ak.hostcaptain.page.mail.alias.list.enabled=Enabled |
ak.hostcaptain.page.mail.alias.list.edit=edit |
ak.hostcaptain.page.mail.alias.list.view=view |
ak.hostcaptain.page.mail.alias.list.delete=delete |
ak.hostcaptain.page.mail.alias.list.back=back |
ak.hostcaptain.page.mail.alias.list.add=add new mail alias |
ak.hostcaptain.page.mail.alias.edit.title=hostcaptain - mail alias - edit |
ak.hostcaptain.page.mail.alias.edit.address=Address |
ak.hostcaptain.page.mail.alias.edit.domain=Domain |
ak.hostcaptain.page.mail.alias.edit.domain.empty=-- please select -- |
ak.hostcaptain.page.mail.alias.edit.owner=Owner |
ak.hostcaptain.page.mail.alias.edit.owner.empty=-- please select -- |
ak.hostcaptain.page.mail.alias.edit.enabled=Enabled |
ak.hostcaptain.page.mail.alias.edit.comment=Comment |
ak.hostcaptain.page.mail.alias.edit.header.tomailbox=To mailbox |
ak.hostcaptain.page.mail.alias.edit.header.toexternal=or to external email |
ak.hostcaptain.page.mail.alias.edit.external=external redirect |
ak.hostcaptain.page.mail.alias.edit.add=add new destination |
ak.hostcaptain.page.mail.alias.edit.delete=delete |
ak.hostcaptain.page.mail.alias.edit.submit=submit |
ak.hostcaptain.page.mail.alias.edit.cancel=cancel |
ak.hostcaptain.page.mail.box.list.title=hostcaptain - mail boxes - list |
ak.hostcaptain.page.mail.box.list.login=Box |
ak.hostcaptain.page.mail.box.list.domain=Domain |
194,7 → 167,7 |
ak.hostcaptain.page.mail.box.edit.domain=Domain |
ak.hostcaptain.page.mail.box.edit.domain.empty=-- please select -- |
ak.hostcaptain.page.mail.box.edit.owner=Owner |
ak.hostcaptain.page.mail.box.edit.owner.empty=-- please select -- |
ak.hostcaptain.page.mail.box.edit.owner.empty=-- create an user -- |
ak.hostcaptain.page.mail.box.edit.systemuser=System user |
ak.hostcaptain.page.mail.box.edit.systemuser.empty=-- please select -- |
ak.hostcaptain.page.mail.box.edit.viruscheck=check mails for viruses |
203,3 → 176,32 |
ak.hostcaptain.page.mail.box.edit.comment=Comment |
ak.hostcaptain.page.mail.box.edit.submit=submit |
ak.hostcaptain.page.mail.box.edit.back=back |
ak.hostcaptain.page.mail.alias.list.title=hostcaptain - mail aliases - list |
ak.hostcaptain.page.mail.alias.list.alias=Alias |
ak.hostcaptain.page.mail.alias.list.domain=Domain |
ak.hostcaptain.page.mail.alias.list.owner=Owner |
ak.hostcaptain.page.mail.alias.list.enabled=Enabled |
ak.hostcaptain.page.mail.alias.list.edit=edit |
ak.hostcaptain.page.mail.alias.list.view=view |
ak.hostcaptain.page.mail.alias.list.delete=delete |
ak.hostcaptain.page.mail.alias.list.back=back |
ak.hostcaptain.page.mail.alias.list.add=add new mail alias |
ak.hostcaptain.page.mail.alias.edit.title=hostcaptain - mail alias - edit |
ak.hostcaptain.page.mail.alias.edit.address=Address |
ak.hostcaptain.page.mail.alias.edit.domain=Domain |
ak.hostcaptain.page.mail.alias.edit.domain.empty=-- please select -- |
ak.hostcaptain.page.mail.alias.edit.owner=Owner |
ak.hostcaptain.page.mail.alias.edit.owner.empty=-- please select -- |
ak.hostcaptain.page.mail.alias.edit.enabled=Enabled |
ak.hostcaptain.page.mail.alias.edit.comment=Comment |
ak.hostcaptain.page.mail.alias.edit.header.tomailbox=To mailbox |
ak.hostcaptain.page.mail.alias.edit.header.toexternal=or to external email |
ak.hostcaptain.page.mail.alias.edit.header.enabled=Enabled |
ak.hostcaptain.page.mail.alias.edit.header.comment=Comment |
ak.hostcaptain.page.mail.alias.edit.external=external redirect |
ak.hostcaptain.page.mail.alias.edit.add=add new destination |
ak.hostcaptain.page.mail.alias.edit.delete=delete |
ak.hostcaptain.page.mail.alias.edit.submit=submit |
ak.hostcaptain.page.mail.alias.edit.back=back |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/model/SystemUserManager.java |
---|
137,13 → 137,15 |
throws ModelException |
{ |
try { |
if(editor.isSuperuser()) |
if(editor.isSuperuser()) { |
return HibernateUtil.currentSession().find("from SystemUser"); |
else |
} |
else { |
return HibernateUtil.currentSession().find( |
"select u from SystemUser u left join u.owner o where o is null or o=?", |
editor, Hibernate.entity(User.class)); |
} |
} |
catch(HibernateException ex) |
{ |
throw new ModelException(ex); |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/model/User.java |
---|
164,12 → 164,12 |
public boolean viewableBy(User user) |
{ |
return user.isSuperuser() || user.equals(boss); |
return user.isSuperuser() || user.equals(boss) || user.equals(this); |
} |
public boolean editableBy(User user) |
{ |
return user.isSuperuser(); |
return user.isSuperuser() || user.equals(boss); |
} |
public boolean deleteableBy(User user) |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/model/MailAliasDestinationManager.java |
---|
4,6 → 4,7 |
import net.sf.hibernate.*; |
import ak.hostcaptain.util.HibernateUtil; |
import ak.hostcaptain.util.ModelException; |
import ak.hostcaptain.util.ModelSecurityException; |
public class MailAliasDestinationManager |
{ |
33,16 → 34,27 |
{ |
} |
public MailAliasDestination create() |
public MailAliasDestination create(User editor) |
throws ModelException |
{ |
if(!allowedToCreate(editor)) throw new ModelSecurityException(); |
return new MailAliasDestination(); |
} |
public MailAliasDestination get(Long id) |
public boolean allowedToCreate(User editor) |
throws ModelException |
{ |
return true; |
} |
public MailAliasDestination get(User editor, Long id) |
throws ModelException |
{ |
MailAliasDestination dest; |
try { |
return (MailAliasDestination)HibernateUtil.currentSession() |
dest = (MailAliasDestination)HibernateUtil.currentSession() |
.load(MailAliasDestination.class, id); |
} |
catch(HibernateException ex) |
49,11 → 61,19 |
{ |
throw new ModelException(ex); |
} |
if(!dest.viewableBy(editor)) |
throw new ModelSecurityException(); |
return dest; |
} |
public void save(MailAliasDestination mailAliasDestination) |
public void save(User editor, MailAliasDestination mailAliasDestination) |
throws ModelException |
{ |
if(!mailAliasDestination.editableBy(editor)) |
throw new ModelSecurityException(); |
try { |
HibernateUtil.currentSession().saveOrUpdate(mailAliasDestination); |
} |
63,9 → 83,12 |
} |
} |
public void delete(MailAliasDestination mailAliasDestination) |
public void delete(User editor, MailAliasDestination mailAliasDestination) |
throws ModelException |
{ |
if(!mailAliasDestination.deleteableBy(editor)) |
throw new ModelSecurityException(); |
try { |
HibernateUtil.currentSession().delete(mailAliasDestination); |
} |
75,11 → 98,6 |
} |
} |
public Collection listMailAliasesDestination() |
{ |
return null; |
} |
public Collection listMailAliasesDestination(MailAlias alias) |
throws ModelException |
{ |
94,6 → 112,12 |
} |
} |
public boolean areMailAliasesDestinationsAvailable(User editor) |
throws ModelException |
{ |
return true; |
} |
private static MailAliasDestinationManager mailAliasDestinationManager = null; |
public static MailAliasDestinationManager getInstance() |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/model/UserManager.java |
---|
2,8 → 2,10 |
import java.util.*; |
import net.sf.hibernate.*; |
import net.sf.hibernate.type.Type; |
import ak.hostcaptain.util.HibernateUtil; |
import ak.hostcaptain.util.ModelException; |
import ak.hostcaptain.util.ModelSecurityException; |
public class UserManager |
{ |
33,21 → 35,37 |
{ |
} |
public User create() |
public User create(User editor) |
throws ModelException |
{ |
if(!allowedToCreate(editor)) throw new ModelSecurityException(); |
return new User(); |
} |
public User get(Long id) |
public boolean allowedToCreate(User editor) |
throws ModelException |
{ |
return editor.isSuperuser(); |
} |
public User get(User editor, Long id) |
throws ModelException |
{ |
User user; |
try { |
return (User)HibernateUtil.currentSession().load(User.class, id); |
user = (User)HibernateUtil.currentSession().load(User.class, id); |
} |
catch(HibernateException ex) |
{ |
throw new ModelException(ex); |
} |
if(!user.viewableBy(editor)) |
throw new ModelSecurityException(); |
return user; |
} |
public User findForLogin(String login) |
68,9 → 86,12 |
} |
} |
public void save(User user) |
public void save(User editor, User user) |
throws ModelException |
{ |
if(!user.editableBy(editor)) |
throw new ModelSecurityException(); |
try { |
HibernateUtil.currentSession().saveOrUpdate(user); |
} |
80,9 → 101,12 |
} |
} |
public void delete(User user) |
public void delete(User editor, User user) |
throws ModelException |
{ |
if(!user.deleteableBy(editor)) |
throw new ModelSecurityException(); |
try { |
HibernateUtil.currentSession().delete(user); |
} |
92,12 → 116,20 |
} |
} |
public Collection listUsers() |
public Collection listUsers(User editor) |
throws ModelException |
{ |
try { |
if(editor.isSuperuser()) { |
return HibernateUtil.currentSession().find("from User"); |
} |
else { |
return HibernateUtil.currentSession().find( |
"from User u where u = ? or u.boss = ?", |
new Object[] { editor, editor}, |
new Type[] { Hibernate.entity(User.class), Hibernate.entity(User.class) } ); |
} |
} |
catch(HibernateException ex) |
{ |
throw new ModelException(ex); |
104,6 → 136,27 |
} |
} |
public boolean areSystemUsersAvailable(User editor) |
throws ModelException |
{ |
try { |
if(editor.isSuperuser()) { |
return true; |
} |
else { |
return ((Integer)HibernateUtil.currentSession().iterate( |
"from User u where u = ? or u.boss = ?", |
new Object[] { editor, editor}, |
new Type[] { Hibernate.entity(User.class), Hibernate.entity(User.class) } ) |
.next()).intValue() > 0; |
} |
} |
catch(HibernateException ex) |
{ |
throw new ModelException(ex); |
} |
} |
public User loginUser(String login, String password) |
throws ModelException |
{ |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/taglib/WriteTag.java |
---|
0,0 → 1,50 |
// based on struts write tag |
package ak.hostcaptain.core.taglib; |
import javax.servlet.jsp.JspException; |
import org.apache.struts.util.RequestUtils; |
import org.apache.struts.util.ResponseUtils; |
public class WriteTag |
extends org.apache.struts.taglib.bean.WriteTag |
{ |
protected String defValue; |
public String getDefault() |
{ |
return defValue; |
} |
public void setDefault(String defValue) |
{ |
this.defValue = defValue; |
} |
public int doStartTag() |
throws JspException |
{ |
Object value; |
if(ignore && RequestUtils.lookup(pageContext, name, scope) == null) |
value = null; |
else |
value = RequestUtils.lookup(pageContext, name, property, scope); |
if(value == null) value = defValue; |
if(value != null) { |
if(filter) |
ResponseUtils.write(pageContext, ResponseUtils.filter(formatValue(value))); |
else |
ResponseUtils.write(pageContext, formatValue(value)); |
} |
return SKIP_BODY; |
} |
public void release() |
{ |
super.release(); |
defValue = null; |
} |
} |
/sun/hostcaptain/trunk/src/ak/hostcaptain/util/StringConverter.java |
---|
2,6 → 2,16 |
public abstract class StringConverter |
{ |
public static boolean isEmpty(Object o) |
{ |
if(o == null) |
return true; |
else if((o instanceof String) && ((String)o).equals("")) |
return true; |
else |
return false; |
} |
public static Long parseLong(Object o) |
throws NumberFormatException |
{ |