Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 27178 Details for
Bug 109614
[waiting-on-build] [iajc.task] java.lang.RuntimeException: Ranges must be updated with an enclosing instructionList
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Class that is failing to compile
AdminUserMB.java (text/plain), 8.63 KB, created by
shahzad bhatti
on 2005-09-15 13:30:48 EDT
(
hide
)
Description:
Class that is failing to compile
Filename:
MIME Type:
Creator:
shahzad bhatti
Created:
2005-09-15 13:30:48 EDT
Size:
8.63 KB
patch
obsolete
>package com.orbitz.admin.modelbean; > >import com.orbitz.admin.modelbean.useradmin.GroupPermissionMB; >import com.orbitz.web.ChannelContext; >import com.orbitz.web.FormSupport; >import com.orbitz.web.ParameterBundle; >import com.orbitz.web.ParameterInfoBean; >import org.apache.log4j.Logger; > >import java.util.ArrayList; >import java.util.HashMap; >import java.util.Iterator; >import java.util.List; >import java.util.Map; > >/** > * <p>Model bean for displaying an Admin Server User > * </p> > * > * <p>(c) 2001-03 Orbitz, LLC. All Rights Reserved.</p> > * > */ >public class AdminUserMB extends FormSupport { > > private static final Logger log = Logger.getLogger(AdminUserMB.class); > > private ParameterInfoBean _id = new ParameterInfoBean("Id"); > private ParameterInfoBean _loginId = new ParameterInfoBean("Login Id"); > private ParameterInfoBean _password = new ParameterInfoBean("Password"); > private ParameterInfoBean _passwordVerify = new ParameterInfoBean("Password Verification"); > private ParameterInfoBean _firstName = new ParameterInfoBean("First Name"); > private ParameterInfoBean _lastName = new ParameterInfoBean("Last Name"); > private HashMap _groupPermissions; > > public AdminUserMB() {} > > public ParameterInfoBean getId() { > return _id; > } > public void setId(ParameterInfoBean value) { > if (value == null) { > throw new NullPointerException("Id ParameterInfoBean must not be null"); > } > _id = value; > } > > public ParameterInfoBean getLoginId() { > return _loginId; > } > public void setLoginId(ParameterInfoBean value) { > if (value == null) { > throw new NullPointerException("Login Id ParameterInfoBean must not be null"); > } > _loginId = value; > } > > // Extra setter so password memorizing browsers don't try to store these > // user ids in their caches. > public void setNewLoginId(ParameterInfoBean value) { > if (value == null) { > throw new NullPointerException("Login Id ParameterInfoBean must not be null"); > } > _loginId = value; > } > > public ParameterInfoBean getPassword() { > return _password; > } > public void setPassword(ParameterInfoBean value) { > if (value == null) { > throw new NullPointerException("Password ParameterInfoBean must not be null"); > } > _password = value; > } > // Extra setter so password memorizing browsers don't try to store these > // user ids in their caches. > public void setNewPassword(ParameterInfoBean value) { > _password = value; > } > > public ParameterInfoBean getPasswordVerify() { > return _passwordVerify; > } > public void setPasswordVerify(ParameterInfoBean value) { > if (value == null) { > throw new NullPointerException("Password Verification ParameterInfoBean must not be null"); > } > _passwordVerify = value; > } > > public ParameterInfoBean getFirstName() { > return _firstName; > } > public void setFirstName(ParameterInfoBean value) { > if (value == null) { > throw new NullPointerException("First Name ParameterInfoBean must not be null"); > } > _firstName = value; > } > > public ParameterInfoBean getLastName() { > return _lastName; > } > public void setLastName(ParameterInfoBean value) { > if (value == null) { > throw new NullPointerException("Last Name ParameterInfoBean must not be null"); > } > _lastName = value; > } > > /** > * Get a List of all the Admin User's Permissions for the given group. > * @param group The group we want the List of permissions for. > * @return A List of GroupPermissionMBs. > */ > public List getGroupPermissions(String group) { > if (group == null) { > return new ArrayList(); > } > > ArrayList list = new ArrayList(); > Iterator groupIter = getAllGroupPermissions().iterator(); > GroupPermissionMB groupPermissionMB = null; > while (groupIter.hasNext()) { > groupPermissionMB = (GroupPermissionMB) > groupIter.next(); > if (groupPermissionMB.getGroupCode().equalsIgnoreCase(group)) { > list.add(groupPermissionMB); > } > } > > return list; > } > > /** > * Add a Group/Permission Model Bean > * @param value The Group/Permission to add. > */ > public void addGroupPermission(GroupPermissionMB value) { > if (value != null) { > getGroupPermissions().put(value.getId(), value); > } > } > > /** > * Get all group permissions > * @return A List of GroupPermissionMBs > */ > public List getAllGroupPermissions() { > > return new ArrayList(getGroupPermissions().values()); > } > > /** > * Accepts a parameter bundle and uses introspection > * to automatically copy the values of the parameter bundle > * (parameter info beans) to the proper setter in this model bean. > * > * @param pb the parameter bundle > */ > public void populate(ChannelContext context, ParameterBundle pb) { > > super.populate(pb); > > String[] permissionIds = > context.getRequest().getParameterValues("permissionId"); > > String delete = null; > String groupCode = null; > String permissionCode = null; > String permissionValue = null; > GroupPermissionMB groupPermissionMB = null; > > if (permissionIds == null) { > return; > } > > for (int i=0; i<permissionIds.length; i++) { > delete = pb.getValue("delete" + permissionIds[i]); > groupCode = pb.getValue("groupCode" + permissionIds[i]); > permissionCode = pb.getValue("permissionCode" + permissionIds[i]); > permissionValue = pb.getValue("permissionValue" + permissionIds[i]); > > groupPermissionMB = new GroupPermissionMB(); > try { > groupPermissionMB.setId(permissionIds[i]); > groupPermissionMB.setDeleteFlag(delete); > groupPermissionMB.setGroupCode(groupCode); > groupPermissionMB.setPermissionCode(permissionCode); > groupPermissionMB.setPermissionValue(permissionValue); > } catch (NumberFormatException e) { > log.warn("Unable to parse permissionId: " + permissionIds[i], e); > } > this.addGroupPermission(groupPermissionMB); > } > } > > // ** PRIVATE METHODS ***************************************************** > > private Map getGroupPermissions() { > if (_groupPermissions == null) { > _groupPermissions = new HashMap(); > } > return _groupPermissions; > } > > public boolean equals(Object o) { > if (this == o) return true; > if (!(o instanceof AdminUserMB)) return false; > > final AdminUserMB adminUserMB = (AdminUserMB) o; > > if (_firstName != null ? !_firstName.equals(adminUserMB._firstName) : adminUserMB._firstName != null) return false; > if (_id != null ? !_id.equals(adminUserMB._id) : adminUserMB._id != null) return false; > if (_lastName != null ? !_lastName.equals(adminUserMB._lastName) : adminUserMB._lastName != null) return false; > if (_loginId != null ? !_loginId.equals(adminUserMB._loginId) : adminUserMB._loginId != null) return false; > if (_password != null ? !_password.equals(adminUserMB._password) : adminUserMB._password != null) return false; > > //if (_groupPermissions != null ? !_groupPermissions.equals(adminUserMB._groupPermissions) : adminUserMB._groupPermissions != null) return false; > > return true; > } > > public int hashCode() { > int result; > result = (_id != null ? _id.hashCode() : 0); > result = 29 * result + (_loginId != null ? _loginId.hashCode() : 0); > result = 29 * result + (_password != null ? _password.hashCode() : 0); > result = 29 * result + (_firstName != null ? _firstName.hashCode() : 0); > result = 29 * result + (_lastName != null ? _lastName.hashCode() : 0); > result = 29 * result + (_groupPermissions != null ? _groupPermissions.hashCode() : 0); > return result; > } > > public String toString() { > return "com.orbitz.admin.modelbean.AdminUserMB{\n" + > "\t _id=" + _id + > "\n" + > "\t _loginId=" + _loginId + > "\n" + > "\t _password=" + _password + > "\n" + > "\t _firstName=" + _firstName + > "\n" + > "\t _lastName=" + _lastName + > "\n" + > "\t _groupPermissions=" + (_groupPermissions == null ? null : "size:" + _groupPermissions.size() + _groupPermissions) + > "\n" + > "}"; > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 109614
: 27178 |
27179