Visualizzazione dell’avatar utente displaying-the-user-avatar
L’avatar dell’utente connesso viene visualizzato nell’angolo superiore destro dell’area di lavoro di AEM Forms. Inoltre, gli avatar dei rapporti diretti nella gerarchia organizzativa vengono visualizzati nella visualizzazione Gestione. È possibile configurare l'area di lavoro AEM Forms per scegliere le immagini utente dal database, ad esempio il server LDAP.
-
Crea un DSC utilizzando i dettagli indicati nel passaggio successivo. Per ulteriori informazioni, consulta l’argomento "Sviluppo di componenti per AEM Forms" in Programmazione con AEM Forms guida.
-
Nel DSC, definisci un nuovo SPI che espone i metodi getCurrentUserImageUrl e getUserImageUrl per ottenere un URL immagine per un utente AEM Forms. Di seguito è riportato un esempio di frammento di codice Java™:
code language-as3 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 } }
-
Crea un file component.xml. Assicurati che spec-id sia come mostrato nello snippet di codice seguente.
Il seguente frammento di codice è un esempio. Personalizzalo in base alle tue esigenze specifiche.
code language-as3 <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>
-
Distribuire DSC tramite Workbench. Riavvia
ProcessManagementClientSessionService
servizio. -
Potrebbe essere necessario aggiornare il browser o disconnettersi/accedere nuovamente con l'utente.