אתה מציג תוכן עזרה עבור גרסה:

Avatar of the logged-in user is displayed in the upper-right corner of AEM Forms workspace. Also, the avatars of direct reports in the organizational hierarchy are displayed in the Manager View. You can configure AEM Forms workspace to pick the user images from your database, say LDAP server.

הערה:

The supported aspect ratio of the user images is 1:1.

  1. Create a DSC, using the details mentioned in the next step. For more information, see 'Developing Components for AEM Forms' topic in Programming with AEM Forms guide.

  2. In the DSC, define a new SPI which exposes getCurrentUserImageUrl and getUserImageUrl methods to get an image URL for an AEM Forms user. Following is a sample Java™ code snippet:

    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 
       } 
    }
  3. Create a component.xml file. Ensure that spec-id is as shown in the code snippet below.

    The following code snippet is a sample. Customize it to suit your specific requirements.

    <component xmlns="http://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>
  4. Deploy DSC through Workbench. Restart ProcessManagementClientSessionService service.

  5. You may have to refresh your browser or logout/login with the user again.

עבודה זו בוצעה ברישיון של Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  הודעות המתפרסמות ב- Twitter™‎ ו- Facebook אינן מכוסות בתנאי Creative Commons.

הצהרות משפטיות   |   מדיניות פרטיות מקוונת