Powered By Blogger

Friday, April 26, 2013

Running Alfresco on mobile

We can get the code from the location
https://github.com/Alfresco/alfresco-android-app/tags/

I have taken build 1.0.1 since I had problem in building other versions
https://github.com/Alfresco/alfresco-android-app/tree/1.0.1

The code taken from here is extracted in the location C:\Experiement\alfresco-android-app-1.0.1\alfresco-android-app-1.0.1

Run the command

C:\Experiement\alfresco-android-app-1.0.1\alfresco-android-app-1.0.1 > mvn install

The above command gives below summary, provided we have installed maven and android sdk and configured variables

ANDROID_HOME - C:\Android\adt-bundle-windows-x86-20130219\sdk
M2_HOME - C:\Maven\apache-maven-3.0.5-bin\apache-maven-3.0.5



[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Alfresco Mobile Android APPS (Parent) ............. SUCCESS [1.417s]
[INFO] Alfresco Mobile Android - Official Application .... SUCCESS [45.761s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 50.068s
[INFO] Finished at: Fri Apr 26 14:58:13 IST 2013
[INFO] Final Memory: 11M/53M
[INFO] ------------------------------------------------------------------------


Once the build is successful it produces
alfresco-mobile-android.apk file


Now we can deploy apk file in simulator

http://developer.android.com/tools/devices/emulator.html
http://developer.android.com/tools/help/adb.html#move



To start an instance of the emulator from the command line, navigate to the tools/ folder of the SDK. Enter emulatorcommand like this:
C:\Android\adt-bundle-windows-x86-20130219\sdk\tools > >emulator -avd test

here test is been already created as the avd name using eclipse.It will open the device. Now we can deploy the apk file using below command to the device configured




C:\Android\adt-bundle-windows-x86-20130219\sdk\platform-tools>adb install C:\Experiement\alfresco-android-app-1.0.1\alfresco-android-app-1.0.1\alfresco-mobile-android\target\alfresco-mobile-android.apk

After running the command we can see the below description

73 KB/s (1013692 bytes in 13.423s)
        pkg: /data/local/tmp/alfresco-mobile-android.apk
Success

Now we can access the alfresco app and connect to the server by providing
username.password , host, port and context path and from there we will be able to access the contents.



Monday, April 15, 2013

LDAP


http://www.lichteblau.com/ldapvi/manual/

http://ldapwiki.willeke.com/wiki/LDAP%20Browsers#section-LDAP+Browsers-LinuxUnixOnly


http://www.linuxfocus.org/English/July2000/article159.shtml

Wednesday, April 3, 2013

Unlimited number of search results in lucene


private SearchParameters getSearchParameters(final NodeRef nodeRef) {
  final SearchParameters params = new SearchParameters();
  params.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
  params.setLanguage(SearchService.LANGUAGE_LUCENE);
  params.setQuery(format(QUERY_PATTERN, ContentModel.TYPE_CONTENT, nodeRef));
  params.setLimitBy(LimitBy.UNLIMITED);
  params.setLimit(0);
  params.setMaxPermissionChecks(100000);
  params.setMaxPermissionCheckTimeMillis(100000);
  params.setMaxItems(-1);
  return params;
 }



In addition in the alfresco-global.properties we can changed below values

system.acl.maxPermissionCheckTimeMillis 
system.acl.maxPermissionCheck

to get it reflcected across the system.