Package org.jayasoft.woj.common.model.content

Examples of org.jayasoft.woj.common.model.content.Visibility


        return _lastUsedMrid;
    }

    public void promoteModuleDescriptorVisibility(String mdId, String visibility) {
        LOGGER.debug("Asking promotion of module: " + mdId + " to " + visibility);
    Visibility newVisibility = Visibility.fromString(visibility);
    ModuleDescriptorDao dao = WOJServer.getInstance().getDataService().getModuleDescriptorDao();
    ModuleDescriptor md = dao.getModule(mdId);
    Visibility oldVisibility = md.getVisibility();
    Long oldAccessorId = md.getAccessorId();
    if (oldVisibility != Visibility.SANDBOX) {
      String msg = md.getModuleInfoAsString() + "cannot be promoted it's not in SANDBOX visibility, it may already have been promoted";
      LOGGER.warn(msg);
      throw new IllegalArgumentException(msg);
View Full Code Here


        }
    }
   
    private ModuleDescriptor getModuleDescriptor(UAK uak, String visibility, String org, String mod, String rev) {
        ModuleDescriptorDao dao= WOJServer.getInstance().getDataService().getModuleDescriptorDao();
        Visibility v = null;
        try {
            v = Visibility.fromString(visibility);
        } catch (Exception e) {
        }
        if (v != null) {
View Full Code Here

        super(Commands.GET_ORGANISATIONS.NAME);
    }

    public Object securedInvoke(UAK uak, Map m) {
        String visibilityName = (String) m.get(Commands.GET_ORGANISATIONS.P_VISIBILITY);
    Visibility visibility = visibilityName != null?Visibility.fromString(visibilityName):null;
        String prefix = CommandUtil.getStringFromParamKey(m, Commands.GET_ORGANISATIONS.P_PREFIX);
    return Arrays.asList(WOJServer.getInstance().getModuleInfoService().getOrganisations(
        visibility,
                prefix
                , uak));
View Full Code Here

        super(Commands.SEARCH.NAME);
    }

    public Object securedInvoke(UAK uak, Map m) throws IOException {
        String visibilityName = (String) m.get(Commands.SEARCH.P_VISIBILITY);
    Visibility visibility = visibilityName != null?Visibility.fromString(visibilityName):null;
        String query = CommandUtil.getStringFromParamKey(m, Commands.SEARCH.P_QUERY);
        Integer startIndex = CommandUtil.getIntegerFromParamKey(m, Commands.SEARCH.P_START_INDEX);
       
    SearchService s = WOJServer.getInstance().getSearchService();
View Full Code Here

        super(Commands.GET_REVISIONS.NAME);
    }

    public Object securedInvoke(UAK uak, Map m) {
        String visibilityName = (String) m.get(Commands.GET_REVISIONS.P_VISIBILITY);
    Visibility visibility = visibilityName != null?Visibility.fromString(visibilityName):null;
        String[] revisions = WOJServer.getInstance().getModuleInfoService().getRevisions(
            visibility,
                CommandUtil.getStringFromParamKey(m, Commands.GET_REVISIONS.P_ORG),
                CommandUtil.getStringFromParamKey(m, Commands.GET_REVISIONS.P_NAME),
                CommandUtil.getStringFromParamKey(m, Commands.GET_REVISIONS.P_PREFIX)
View Full Code Here

    }

    public Object securedInvoke(UAK uak, Map m) {
        String visibilityName = (String) m.get(Commands.GET_ORG_MOD_REV_TREE.P_VISIBILITY);
        String org = (String) m.get(Commands.GET_ORG_MOD_REV_TREE.P_ORGANISATION);
    Visibility visibility = visibilityName != null?Visibility.fromString(visibilityName):null;
    return WOJServer.getInstance().getModuleInfoService().getOrgModRev(visibility, org, uak);
    }
View Full Code Here

    public GetAllAreaInfoCommand() {
        super(Commands.GET_ALL_AREA_INFO.NAME);
    }
   
    public Object securedInvoke(UAK uak, Map m) {
       Visibility v = Visibility.fromInt(CommandUtil.getIntegerFromParamKey(m,Commands.GET_AREA_INFO.P_VISIBILITY).intValue());
       return WOJServer.getInstance().getContentService().getAllAreaInfo(
               v,
               CommandUtil.getLongFromParamKey(m,Commands.GET_ALL_AREA_INFO.P_GROUP_ID),
               CommandUtil.getStringFromParamKey(m, Commands.GET_ALL_AREA_INFO.P_ORGANISATION),
               CommandUtil.getStringFromParamKey(m, Commands.GET_ALL_AREA_INFO.P_MODULE)
View Full Code Here

    public GetModuleCommand() {
        super(Commands.GET_MODULE.NAME);
    }
   
    public Object securedInvoke(UAK uak, Map m) {
       Visibility v = Visibility.fromInt(CommandUtil.getIntegerFromParamKey(m,Commands.GET_MODULE.P_VISIBILITY).intValue());
       return WOJServer.getInstance().getModuleManagementService().getModuleDescriptor(
               uak,
               v,
               (String)m.get(Commands.GET_MODULE.P_MOD_ORG),
               (String)m.get(Commands.GET_MODULE.P_MOD_NAME),
View Full Code Here

    public GetAreaInfoCommand() {
        super(Commands.GET_AREA_INFO.NAME);
    }
   
    public Object securedInvoke(UAK uak, Map m) {
       Visibility v = Visibility.fromInt(CommandUtil.getIntegerFromParamKey(m,Commands.GET_AREA_INFO.P_VISIBILITY).intValue());
       return WOJServer.getInstance().getContentService().getAreaInfo(
               v,
               CommandUtil.getLongFromParamKey(m,Commands.GET_AREA_INFO.P_GROUP_ID)
               );
    }
View Full Code Here

        super(Commands.GET_MODULE_NAMES.NAME);
    }

    public Object securedInvoke(UAK uak, Map m) {
        String visibilityName = (String) m.get(Commands.GET_MODULE_NAMES.P_VISIBILITY);
    Visibility visibility = visibilityName != null?Visibility.fromString(visibilityName):null;
        return Arrays.asList(WOJServer.getInstance().getModuleInfoService().getModuleNames(
            visibility,
                CommandUtil.getStringFromParamKey(m, Commands.GET_MODULE_NAMES.P_ORG),
                CommandUtil.getStringFromParamKey(m, Commands.GET_MODULE_NAMES.P_PREFIX),
                uak));
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.common.model.content.Visibility

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.