Displays the access control list of a given resource.<p>

@param resourceName the name of the resource

@throws Exception if something goes wrong

@see CmsObject#getAccessControlList(String)
430817
public void getAcl(String resourceName) throws Exception {

        CmsAccessControlList acList = m_cms.getAccessControlList(resourceName);
        Iterator<CmsUUID> principals = acList.getPrincipals().iterator();
        while (principals.hasNext()) {
            I_CmsPrincipal p = m_cms.lookupPrincipal(principals.next());
            m_shell.getOut().println(p.getName() + ": " + acList.getPermissions(p.getId()).getPermissionString());
        }
    }
979207
public static authorizationaction get(nitro_service service, String name) throws Exception{
		authorizationaction obj = new authorizationaction();
		obj.set_name(name);
		authorizationaction response = (authorizationaction) obj.get_resource(service);
		return response;
	}
856930
public CmsPermissionSet getPermissions(String resourceName, String userName) throws CmsException {

        // reading permissions is allowed even if the resource is marked as deleted
        CmsResource resource = readResource(resourceName, CmsResourceFilter.ALL);
        CmsUser user = readUser(userName);
        return m_securityManager.getPermissions(m_context, resource, user);
    }
1140177
private String readResource(final String resourceName) throws IOException {
      return new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(resourceName), DEFAULT_CHARSET)).lines().collect(Collectors.joining("\n"));
   }
1171236
protected Acl collectAcl(CmsObject cms, CmsResource resource, boolean onlyBasic) {

        AccessControlListImpl cmisAcl = new AccessControlListImpl();
        List<Ace> cmisAces = new ArrayList<Ace>();
        cmisAcl.setAces(cmisAces);
        cmisAcl.setExact(Boolean.FALSE);
        return cmisAcl;
    }
732644
public static wisite_accessmethod_binding[] get(nitro_service service, String sitepath) throws Exception{
		wisite_accessmethod_binding obj = new wisite_accessmethod_binding();
		obj.set_sitepath(sitepath);
		wisite_accessmethod_binding response[] = (wisite_accessmethod_binding[]) obj.get_resources(service);
		return response;
	}
160979
private void showHeader() throws CmsException {

        CmsSitemapUI ui = (CmsSitemapUI)A_CmsUI.get();
        String title = null;
        String description = null;
        String path = null;
        String locale = m_rootLocale.toString();
        CmsObject cms = A_CmsUI.getCmsObject();
        CmsResource targetRes = getRoot();
        if (targetRes.isFolder()) {
            targetRes = cms.readDefaultFile(targetRes, CmsResourceFilter.IGNORE_EXPIRATION);
            if (targetRes == null) {
                targetRes = getRoot();
            }
        }
        CmsResourceUtil resUtil = new CmsResourceUtil(cms, getRoot());
        title = resUtil.getTitle();
        description = resUtil.getGalleryDescription(A_CmsUI.get().getLocale());
        path = OpenCms.getLinkManager().getServerLink(
            cms,
            cms.getRequestContext().removeSiteRoot(targetRes.getRootPath()));
        String iconClasses = CmsIconUtil.getIconClasses(
            CmsIconUtil.getDisplayType(cms, getRoot()),
            getRoot().getName(),
            false);
        ui.getSitemapExtension().showInfoHeader(title, description, path, locale, iconClasses);
    }
1076140
public List<CmsAccessControlEntry> getAllAccessControlEntries(CmsRequestContext context) throws CmsException {

        CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
        List<CmsAccessControlEntry> result = null;
        try {
            result = m_driverManager.getAllAccessControlEntries(dbc);
        } catch (Exception e) {
            dbc.report(null, Messages.get().container(Messages.ERR_GET_ACL_ENTRIES_1, "<all resources>"), e);
        } finally {
            dbc.clear();
        }
        return result;

    }
671321
@Override
	public Set<String> getResourceNames(String dirName) {
		Set<String> resourceNames = new TreeSet<>();

		if (generatorRegistry.isPathGenerated(dirName)) {
			List<ResourceBrowser> browsers = new ArrayList<>();
			browsers.addAll(resourceGeneratorInfoProviders);
			for (ResourceBrowser rsBrowser : browsers) {

				if (rsBrowser instanceof ResourceGenerator) {
					ResourceGenerator rsGeneratorBrowser = (ResourceGenerator) rsBrowser;
					if (rsGeneratorBrowser.getResolver().matchPath(dirName)) {
						resourceNames.addAll(rsBrowser.getResourceNames(dirName));
						break;
					}
				}
			}
		} else {
			resourceNames = servletCtxResourceBrowser.getResourceNames(dirName);
		}

		return resourceNames;
	}
1156128
public void displayDialog() throws Exception {

        if (getAction() == ACTION_CANCEL) {
            actionCloseDialog();
        }
        String link1 = CmsHistoryListUtil.getHistoryLink(getCms(), new CmsUUID(m_paramId1), m_paramVersion1);
        String link2 = CmsHistoryListUtil.getHistoryLink(getCms(), new CmsUUID(m_paramId2), m_paramVersion2);
        JspWriter out = getJsp().getJspContext().getOut();
        out.println(dialogBlockStart(key(Messages.GUI_COMPARE_CONTENT_0)));
        out.println(dialogContentStart(null));
        out.println("<table cellpadding='0' cellspacing='0' border='0' class='maxwidth'><tr align='center'><th>");
        out.println(
            key(
                Messages.GUI_COMPARE_VERSION_1,
                new String[] {CmsHistoryListUtil.getDisplayVersion(m_paramVersion1, getLocale())}));
        out.println("</th><th>");
        out.println(
            key(
                Messages.GUI_COMPARE_VERSION_1,
                new String[] {CmsHistoryListUtil.getDisplayVersion(m_paramVersion2, getLocale())}));
        out.println("</th></tr>");
        out.println("<tr><td>&nbsp;</td><td>&nbsp;</td></tr>");
        out.println("\t<tr align='center'>\n");
        out.println("\t\t<td width='50%'><img src='");
        out.print(getJsp().link(link1));
        out.print("' alt='");
        out.print(
            key(
                Messages.GUI_COMPARE_VERSION_1,
                new String[] {CmsHistoryListUtil.getDisplayVersion(m_paramVersion1, getLocale())}));
        out.print("'/></td>\n");
        out.println("\t\t<td width='50%'><img src='");
        out.print(getJsp().link(link2));
        out.print("' alt='");
        out.print(
            key(
                Messages.GUI_COMPARE_VERSION_1,
                new String[] {CmsHistoryListUtil.getDisplayVersion(m_paramVersion2, getLocale())}));
        out.print("'/></td>\n");
        out.println("\t</tr>");
        out.println("</table>");
        out.println(dialogBlockEnd());
        out.println(dialogContentEnd());
        out.println(dialogEnd());
        out.println(bodyEnd());
        out.println(htmlEnd());
    }
662271
protected void showResources(String propertyName) {

        CmsSearchReplaceSettings settings = new CmsSearchReplaceSettings();
        settings.setPaths(Collections.singletonList("/"));
        settings.setSiteRoot("");
        settings.setSearchpattern(".*");
        settings.setType(SearchType.properties);
        try {
            settings.setProperty(A_CmsUI.getCmsObject().readPropertyDefinition(propertyName));
        } catch (CmsException e) {
            //
        }
        CmsAppWorkplaceUi.get().getNavigator().navigateTo(
            CmsSourceSearchAppConfiguration.APP_ID + "/" + CmsSourceSearchApp.generateState(settings));
    }
518521
public Observable<Page<SpatialAnchorsAccountInner>> listByResourceGroupAsync(final String resourceGroupName) {
        return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
            .map(new Func1<ServiceResponse<Page<SpatialAnchorsAccountInner>>, Page<SpatialAnchorsAccountInner>>() {
                @Override
                public Page<SpatialAnchorsAccountInner> call(ServiceResponse<Page<SpatialAnchorsAccountInner>> response) {
                    return response.body();
                }
            });
    }
485770
private String getAccessId(WSCredential cred) {
        String accessId = null;
        try {
            accessId = cred.getAccessId();
        } catch (CredentialExpiredException e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Caught exception getting the access id: " + e);
            }
        } catch (CredentialDestroyedException e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Caught exception getting the access id: " + e);
            }
        }
        // TODO if ignoreCase is Collection, then lower case the accessid
        return accessId;
    }
1156695
public List<CmsRole> getRolesForResource(CmsObject cms, CmsUser user, CmsResource resource) throws CmsException {

        return m_securityManager.getRolesForResource(cms.getRequestContext(), user, resource);
    }
1048331
private String getPermissionString(CmsObject cms, CmsResource res, DialogType type) throws CmsException {

        if (type.equals(DialogType.User)) {
            cms.getPermissions(res.getRootPath(), m_principal.getName()).getPermissionString();
        } else if (type.equals(DialogType.Group)) {
            Iterator<CmsAccessControlEntry> itAces = cms.getAccessControlEntries(res.getRootPath(), false).iterator();
            while (itAces.hasNext()) {
                CmsAccessControlEntry ace = itAces.next();
                if (ace.getPrincipal().equals(m_principal.getId())) {
                    return ace.getPermissions().getPermissionString();
                }
            }
        }
        return "";
    }
338056
public static String getExtension(String resourceName) {

        String result = null;
        if (!resourceName.endsWith("/")) {
            // folders don't have any extension
            resourceName = CmsResource.getName(resourceName);
            int index = resourceName.lastIndexOf(".") + 1;
            if ((index > 0) && (index < resourceName.length())) {
                result = resourceName.substring(index).toLowerCase();
            }
        }

        return result;
    }
695982
public Observable<Page<AzureFirewallInner>> listByResourceGroupAsync(final String resourceGroupName) {
        return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
            .map(new Func1<ServiceResponse<Page<AzureFirewallInner>>, Page<AzureFirewallInner>>() {
                @Override
                public Page<AzureFirewallInner> call(ServiceResponse<Page<AzureFirewallInner>> response) {
                    return response.body();
                }
            });
    }