当前位置: 首页>>代码示例>>Java>>正文


Java DataType.getDataType方法代码示例

本文整理汇总了Java中framework.commons.DataType.getDataType方法的典型用法代码示例。如果您正苦于以下问题:Java DataType.getDataType方法的具体用法?Java DataType.getDataType怎么用?Java DataType.getDataType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在framework.commons.DataType的用法示例。


在下文中一共展示了DataType.getDataType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addSystemLevelRoleType

import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void addSystemLevelRoleType(String uid, String systemLevelRoleTypeName) throws AccountManagementException {
    if (log.isDebugEnabled()) {
        log.debug("Adding role " + systemLevelRoleTypeName + " for user account with uid  " + uid);
    }
    invalidateUserAccountCache(uid);
    Principal userPrincipal = findPrincipalAndCheckForAuthenticationBackEndConsistency(uid);
    if (!userPrincipal.getAccountTypeAsObject().isRolesEditable())
        return;
    userPrincipal.addSystemLevelRole(getAllRoles().get(systemLevelRoleTypeName));

    // Notify the MAF modules
    UserEventMessage eventMessage = new UserEventMessage(userPrincipal.id, DataType.getDataType(IFrameworkConstants.User),
            UserEventMessage.MessageType.OBJECT_UPDATED);
    postToPlugginManagerService(eventMessage);

    log.info(String.format("Group %s added for uid %s", systemLevelRoleTypeName, uid));
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:19,代码来源:AccountManagerPluginImpl.java

示例2: updateBasicUserData

import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void updateBasicUserData(String uid, String firstName, String lastName) throws AccountManagementException {
    if (log.isDebugEnabled()) {
        log.debug("Updating the user basic data for account uid  " + uid + " with " + firstName + " " + lastName);
    }
    invalidateUserAccountCache(uid);

    getAuthenticationAccountWriterPlugin().updateUserProfile(uid, firstName, lastName, null);

    Principal principal = findPrincipalFromUid(uid);
    // Notify the MAF modules
    UserEventMessage eventMessage = new UserEventMessage(principal.id, DataType.getDataType(IFrameworkConstants.User),
            UserEventMessage.MessageType.OBJECT_UPDATED);
    postToPlugginManagerService(eventMessage);

    log.info(String.format("User basic data updated with uid %s", uid));
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:18,代码来源:AccountManagerPluginImpl.java

示例3: updateUserAccountType

import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void updateUserAccountType(String uid, AccountType accountType) throws AccountManagementException {
    if (log.isDebugEnabled()) {
        log.debug("Changing the user account type for account uid  " + uid + " with account type " + accountType);
    }
    invalidateUserAccountCache(uid);
    Principal userPrincipal = findPrincipalAndCheckForAuthenticationBackEndConsistency(uid);
    userPrincipal.accountType = accountType.name();
    userPrincipal.removeAllSystemLevelRoles();
    addingRolesToPrincipalForAccountType(userPrincipal, accountType, null);
    userPrincipal.save();

    // Notify the MAF modules
    UserEventMessage eventMessage = new UserEventMessage(userPrincipal.id, DataType.getDataType(IFrameworkConstants.User),
            UserEventMessage.MessageType.OBJECT_UPDATED);
    postToPlugginManagerService(eventMessage);

    log.info(String.format("User account type updated with uid %s and account type %s", uid, accountType.name()));
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:20,代码来源:AccountManagerPluginImpl.java

示例4: manageGroup

import framework.commons.DataType; //导入方法依赖的package包/类
/**
 * Displays the form for creating or editing a group
 *
 * @param dataTypeName the custom attribute associated {@link DataType}
 * @param id the id of the group (0 if it is a creation)
 */
public Result manageGroup(String dataTypeName, Long id) {
    DataType dataType = DataType.getDataType(dataTypeName);

    Form<CustomAttributeGroupFormData> form = groupFormTemplate;

    if (!id.equals(0L)) {
        CustomAttributeGroup customAttributeGroup = CustomAttributeGroup.getById(id);
        form = groupFormTemplate.fill(new CustomAttributeGroupFormData(customAttributeGroup, getI18nMessagesPlugin()));
    }

    return ok(views.html.admin.config.customattribute.group_manage.render(dataType, form));
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:19,代码来源:ConfigurationCustomAttributeController.java

示例5: addSystemLevelRoleTypes

import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void addSystemLevelRoleTypes(String uid, List<String> systemLevelRoleTypeNames) throws AccountManagementException {
    if (log.isDebugEnabled()) {
        log.debug("Adding roles " + systemLevelRoleTypeNames + " for user account with uid  " + uid);
    }
    invalidateUserAccountCache(uid);
    Ebean.beginTransaction();
    try {
        Principal userPrincipal = findPrincipalAndCheckForAuthenticationBackEndConsistency(uid);
        if (!userPrincipal.getAccountTypeAsObject().isRolesEditable())
            return;
        for (String systemLevelRoleTypeName : systemLevelRoleTypeNames) {
            userPrincipal.addSystemLevelRole(getAllRoles().get(systemLevelRoleTypeName));
        }

        // Notify the MAF modules
        UserEventMessage eventMessage = new UserEventMessage(userPrincipal.id, DataType.getDataType(IFrameworkConstants.User),
                UserEventMessage.MessageType.OBJECT_UPDATED);
        postToPlugginManagerService(eventMessage);

        Ebean.commitTransaction();
    } catch (Exception e) {
        Ebean.rollbackTransaction();
        String message = String.format("Error during the addition of a set of groups for uid=%s", uid);
        log.error(message, e);
        throw new AccountManagementException(message, e);
    } finally {
        Ebean.endTransaction();
    }
    log.info(String.format("User groups added for uid %s with groups", uid));
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:32,代码来源:AccountManagerPluginImpl.java

示例6: getRegistrationConfiguratorControllerClassNames

import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public Map<DataType, String> getRegistrationConfiguratorControllerClassNames() {
    if (registrationControllers == null) {
        registrationControllers = Collections.synchronizedMap(new HashMap<>());
        if (getPluginDescriptor().getRegistrationConfigurationControllerDescriptors() != null) {
            for (PluginRegistrationConfiguratorControllerDescriptor desc : getPluginDescriptor().getRegistrationConfigurationControllerDescriptors()) {
                DataType dataType = DataType.getDataType(desc.getDataType());
                registrationControllers.put(dataType, desc.getControllerClass());
            }
            registrationControllers = Collections.unmodifiableMap(registrationControllers);
        }
    }
    return registrationControllers;
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:15,代码来源:ReadOnlyExtensionDescriptor.java

示例7: updateActivationStatus

import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void updateActivationStatus(String uid, boolean isActive) throws AccountManagementException {
    if (log.isDebugEnabled()) {
        log.debug("Updating the activation status for account uid  " + uid + " with " + isActive);
    }
    invalidateUserAccountCache(uid);
    Ebean.beginTransaction();
    try {
        // Create the entry in the database
        Principal userPrincipal = findPrincipalAndCheckForAuthenticationBackEndConsistency(uid);
        userPrincipal.isActive = isActive;
        userPrincipal.save();

        getAuthenticationAccountWriterPlugin().changeActivationStatus(uid, isActive);

        // Notify the MAF modules
        UserEventMessage eventMessage = new UserEventMessage(userPrincipal.id, DataType.getDataType(IFrameworkConstants.User),
                UserEventMessage.MessageType.OBJECT_STATUS_CHANGED);
        postToPlugginManagerService(eventMessage);

        Ebean.commitTransaction();
    } catch (Exception e) {
        Ebean.rollbackTransaction();
        String message = String.format("Error during the update of the activation status of account uid=%s", uid);
        log.error(message, e);
        throw new AccountManagementException(message, e);
    } finally {
        Ebean.endTransaction();
    }
    log.info(String.format("Activation status changed for user %s with %s", uid, isActive));
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:32,代码来源:AccountManagerPluginImpl.java

示例8: removeSystemLevelRoleTypes

import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void removeSystemLevelRoleTypes(String uid, List<String> systemLevelRoleTypeNames) throws AccountManagementException {
    if (log.isDebugEnabled()) {
        log.debug("Removing roles " + systemLevelRoleTypeNames + " for user account with uid  " + uid);
    }
    invalidateUserAccountCache(uid);
    try {
        Principal userPrincipal = findPrincipalAndCheckForAuthenticationBackEndConsistency(uid);
        if (!userPrincipal.getAccountTypeAsObject().isRolesEditable())
            return;
        for (String groupName : systemLevelRoleTypeNames) {
            userPrincipal.removeSystemLevelRole(getAllRoles().get(groupName));
        }

        // Notify the MAF modules
        UserEventMessage eventMessage = new UserEventMessage(userPrincipal.id, DataType.getDataType(IFrameworkConstants.User),
                UserEventMessage.MessageType.OBJECT_UPDATED);
        postToPlugginManagerService(eventMessage);

    } catch (Exception e) {
        Ebean.rollbackTransaction();
        String message = String.format("Error during the removal of a set of groups for uid=%s", uid);
        log.error(message, e);
        throw new AccountManagementException(message, e);
    } finally {
        Ebean.endTransaction();
    }
    log.info(String.format("User groups removed for uid %s with groups", uid));
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:30,代码来源:AccountManagerPluginImpl.java

示例9: getBudgetBucket

import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getBudgetBucket() {
    return DataType.getDataType(IMafConstants.BudgetBucket);
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-datamodel,代码行数:4,代码来源:MafDataType.java

示例10: getDeliverable

import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getDeliverable() {
    return DataType.getDataType(IMafConstants.Deliverable);
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-datamodel,代码行数:4,代码来源:MafDataType.java

示例11: getRequirement

import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getRequirement() {
    return DataType.getDataType(IMafConstants.Requirement);
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-datamodel,代码行数:4,代码来源:MafDataType.java

示例12: getPortfolioEntryBudgetLine

import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getPortfolioEntryBudgetLine() {
    return DataType.getDataType(IMafConstants.PortfolioEntryBudgetLine);
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-datamodel,代码行数:4,代码来源:MafDataType.java

示例13: getPortfolioEntryEvent

import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getPortfolioEntryEvent() {
    return DataType.getDataType(IMafConstants.PortfolioEntryEvent);
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-datamodel,代码行数:4,代码来源:MafDataType.java

示例14: getPurchaseOrderLineItem

import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getPurchaseOrderLineItem() {
    return DataType.getDataType(IMafConstants.PurchaseOrderLineItem);
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-datamodel,代码行数:4,代码来源:MafDataType.java

示例15: getLifeCycleMilestoneInstance

import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getLifeCycleMilestoneInstance() {
    return DataType.getDataType(IMafConstants.LifeCycleMilestoneInstance);
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-datamodel,代码行数:4,代码来源:MafDataType.java


注:本文中的framework.commons.DataType.getDataType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。