登入使用者的頭像會顯示在AEM Forms工作區的右上角。 此外,組織階層中直接報表的變數會顯示在「管理員檢視」中。 您可以配置AEM Forms工作區,從資料庫(如LDAP伺服器)中挑選用戶映像。
支援的使用者影像長寬比為1:1。
使用下一步驟提及的詳細資訊建立DSC。 如需詳細資訊,請參閱以下主題中的「開發AEM Forms的元件」主題: 使用AEM Forms進行程式設計 指南。
在DSC中,定義新的SPI,此SPI會公開getCurrentUserImageUrl和getUserImageUrl方法,以取得AEM Forms使用者的影像URL。 以下是範例Java™程式碼片段:
public class DemoUserImageURLProviderService {
public String getCurrentUserImageUrl()
{
// return the URL for profile Image of logged in user
}
public String getUserImageUrl(String principalOid)
{
// return the URL for profile Image for user represented by this principal Oid
}
}
建立元件.xml檔案。 請確定規格ID如下列程式碼片段所示。
下列程式碼片段為範例。 自訂以符合您的特定需求。
<component xmlns="https://adobe.com/idp/dsc/component/document">
<component-id>com.adobe.sample.DemoUsersComponent</component-id>
<version>1.1</version>
<supports-export>false</supports-export>
<descriptor-class>com.adobe.idp.dsc.component.impl.DefaultPOJODescriptorImpl</descriptor-class>
<services>
<service name="DemoUserImageURLProviderService" title="Demo User ImageURL provider service" orchestrateable="false">
<auto-deploy service-id="DemoUserImageURLProviderService" category-id="Demo Users Component DSC" major-version="1" minor-version="0" />
<description>Service for resolving user image url.</description>
<specifications>
<specification spec-id="com.adobe.idp.taskmanager.dsc.enterprise.UserImageUrlProvider"/>
</specifications>
<specification-version>1.0</specification-version>
<implementation-class>com.adobe.sample.demousers.DemoUserImageURLProviderService</implementation-class>
<request-processing-strategy>single_instance</request-processing-strategy>
<supported-connectors>default</supported-connectors>
<operation-config>
<operation-name>*</operation-name>
<transaction-type>Container</transaction-type>
<transaction-propagation>supports</transaction-propagation>
<!--transaction-timeout>3000</transaction-timeout-->
</operation-config>
<operations>
<operation anonymous-access="false" name="getCurrentUserImageUrl" method="getCurrentUserImageUrl">
<output-parameter name="result" type="java.lang.String"/>
</operation>
<operation anonymous-access="false" name="getUserImageUrl"
method="getUserImageUrl">
<input-parameter name="principalOid" type="java.lang.String"/>
<output-parameter name="result" type="java.lang.String"/>
</operation>
</operations>
</service>
</services>
</component>
透過Workbench部署DSC。 重新啟動 ProcessManagementClientSessionService
服務。
您可能需要重新整理瀏覽器,或重新登出/登入使用者。