cancel
Showing results for 
Search instead for 
Did you mean: 

How to override a class into a custom class when the pre-defined class is not getting imported?

anky_p
Confirmed Champ
Confirmed Champ

 Hi all,
 I had been working on auto-generation of invite mails with username and password on creation of new users.Had done with that task but yesterday we came to find out that functionality is already available for bulk upload of users(Upload User CSV). Now I am looking for the class where this functionality was already present and I guess its UserCSVUploadPost.java. Not sure though. How to override this class on my local as I am not able to import it. Have copied the bean of this class keeping my custom class as the class.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

<bean id="webscript.org.alfresco.repository.person.user-csv-upload.post"
class="com.eisenvault.demoWebscripts.CustomUserBulkUpload"
parent="webscript">
<property name="authenticationService" ref="AuthenticationService" />
<property name="authorityService" ref="AuthorityService" />
<property name="personService" ref="PersonService" />
<property name="tenantService" ref="tenantService" />
<property name="dictionaryService" ref="DictionaryService"/>
<property name="transactionHelper" ref="web.retryingTransactionHelper" />
</bean>

</beans>

 I need to check how this auto-generation of mails is happening in bulk upload.
Please let me know how to proceed further...

2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator

In an Alfresco SDK project you need to add a dependency to the alfresco-remote-api artifact in order to import any web script classes like the bulk user CSV upload one. The source code can also be found in GitHub.

anky_p
Confirmed Champ
Confirmed Champ

I had created this with my custom class..Not sure why I am not able to override the class

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE beans SYSTEM "http://www.springframework.org/dtd/spring-beans.dtd" PUBLIC "-//SPRING//DTD BEAN//EN">

-<beans>


-<bean parent="webscript" class="com.eisenvault.demoWebscripts.CustomUserBulkUpload" id="webscript.org.alfresco.repository.person.user-csv-upload.post">

<property ref="AuthenticationService" name="authenticationService"/>

<property ref="AuthorityService" name="authorityService"/>

<property ref="PersonService" name="personService"/>

<property ref="tenantService" name="tenantService"/>

<property ref="DictionaryService" name="dictionaryService"/>

<property ref="web.retryingTransactionHelper" name="transactionHelper"/>

</bean>

</beans>