Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.UserTypeAccess


    // final PreventiveActionManager preventiveActionManager =
    // (PreventiveActionManager) ModelUtil
    // .getBean(PreventiveActionManager.MANAGER_NAME);

    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWriteAccess(1);
    WindowAccess windowAccess = new WindowAccess();
    windowAccess.setWindowName("Produksjonsenhet");
    userTypeAccess.setWindowAccess(windowAccess);
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);

    // final JobFunctionManager jobFunctionManager = (JobFunctionManager)
    // ModelUtil
View Full Code Here


   
    when(managerRepository.getOrderManager()).thenReturn(orderManager);

    final UserType userType = new UserType();
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWriteAccess(1);
    WindowAccess windowAccess = new WindowAccess();
    windowAccess.setWindowName("Produksjonsenhet");
    userTypeAccess.setWindowAccess(windowAccess);
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);
    userType.setIsAdmin(1);
   
    when(login.getUserType()).thenReturn(userType);
View Full Code Here

    costTypeManager = (CostTypeManager) ModelUtil
        .getBean("costTypeManager");
    final UserType userType = new UserType();
    userType.setIsAdmin(1);
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWindowAccess(new WindowAccess(null, "Attributter",
        null));
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);

    viewHandler = new CostTypeViewHandler(login, costTypeManager);
View Full Code Here

        .getBean("applicationUserManager");

    final UserType userType = new UserType();
    userType.setIsAdmin(1);
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWindowAccess(new WindowAccess(null, "Attributter",
        null));
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);

    viewHandler = new ApplicationUserViewHandler(login,
View Full Code Here

    when(managerRepository.getProductAreaManager()).thenReturn(
        productAreaManager);
    final UserType userType = new UserType();
    userType.setIsAdmin(1);
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWindowAccess(new WindowAccess(null, "Attributter",
        null));
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);

    viewHandler = new OrderViewHandler(login, managerRepository,
View Full Code Here

    applicationUser.setUserName("username");
    when(login.getApplicationUser()).thenReturn(applicationUser);

    final UserType userType = new UserType();
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWriteAccess(1);
    WindowAccess windowAccess = new WindowAccess();
    windowAccess.setWindowName("Produksjonsenhet");
    userTypeAccess.setWindowAccess(windowAccess);
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
View Full Code Here

    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);

    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWindowAccess(new WindowAccess(null, "Attributter",
        null));
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);
    ProductArea productArea = new ProductArea();
    ProductAreaGroup productAreaGroup = new ProductAreaGroup();
View Full Code Here

         * @param columnIndex
         * @return verdi
         */
        public Object getValueAt(int rowIndex, int columnIndex) {
            WindowAccess windowAccess = (WindowAccess) getRow(rowIndex);
            UserTypeAccess userTypeAccess = userTypeAccessMap.get(windowAccess);
            switch (columnIndex) {
            case 0:
                return windowAccess.getWindowName();
            case 1:
                if (userTypeAccess != null) {
                    return Boolean.TRUE;
                }
                return Boolean.FALSE;
            case 2:
                if (userTypeAccess != null) {
                    return Util.convertNumberToBoolean(userTypeAccess
                            .getWriteAccess());
                }
                return Boolean.FALSE;
            default:
                throw new IllegalStateException("Unknown column");
View Full Code Here

        @SuppressWarnings("unchecked")
        @Override
        public void setValueAt(Object object, int rowIndex, int columnIndex) {
            Boolean access = (Boolean) object;
            WindowAccess windowAccess = (WindowAccess) getRow(rowIndex);
            UserTypeAccess userTypeAccess = userTypeAccessMap.get(windowAccess);
            UserType userType = ((UserTypeModel) presentationModel.getBean())
                    .getObject();
            List<UserTypeAccess> userTypeAccessList = (List<UserTypeAccess>) presentationModel
                    .getBufferedValue(UserTypeModel.PROPERTY_USER_TYPE_ACCESS_LIST);
            if (access) {
                if (userTypeAccess == null) {
                    userTypeAccess = new UserTypeAccess(null, 0, userType,
                            windowAccess);
                    userTypeAccessList.add(userTypeAccess);
                    userTypeAccessMap.put(windowAccess, userTypeAccess);
                }
            }
            switch (columnIndex) {
            case 1:
                if (!access) {
                    userTypeAccessList.remove(userTypeAccess);
                    userTypeAccessMap.put(windowAccess, null);
                }
                break;
            case 2:
                if (access) {
                    userTypeAccess.setWriteAccess(1);
                } else {
                    userTypeAccess.setWriteAccess(0);
                }
                break;
            }
            presentationModel.setBufferedValue(
                    UserTypeModel.PROPERTY_USER_TYPE_ACCESS_LIST,
View Full Code Here

    applicationUser.setUserName("username");
    applicationUser.setGroupUser("Nei");
    when(login.getApplicationUser()).thenReturn(applicationUser);
    final UserType userType = new UserType();
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWriteAccess(1);
    WindowAccess windowAccess = new WindowAccess();
    windowAccess.setWindowName("Produksjonsenhet");
    userTypeAccess.setWindowAccess(windowAccess);
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
    final DeviationOverviewViewFactory deviationOverviewViewFactory = new DeviationOverviewViewFactory() {
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.model.UserTypeAccess

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.