This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The connection URL to the LDAP server with the following syntax: <code>ldap[s]://hostname:port/base_dn</code>. | |
*/ | |
@Configurable | |
@Placement(group = "Connection", order = 0) | |
@FriendlyName("URL") | |
private String url; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Performs a LDAP search returning a list with all the resulting LDAP entries. | |
* <p/> | |
* For queries returning large results it is recommended to use pagination (not all LDAP servers support this or are configured to support it). | |
* For that you need to provide a page size value that should be less or equal than max results (count limit). If you are getting a | |
* Sizelimit Exceeded exception then you should check that the authenticated user has enough privileges or the LDAP server is not | |
* limited by configuration. | |
* <p/> | |
* <h4>Returning all attributes for all persons that have Doe as surname</h4> | |
* {@sample.xml ../../../doc/mule-module-ldap.xml.sample ldap:search-1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Processor | |
@InvalidateConnectionOn(exception = CommunicationException.class) | |
public LDAPEntry lookup(@FriendlyName("DN") String dn, @Optional List<String> attributes) throws Exception | |
{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Connect | |
public void connect(@ConnectionKey @FriendlyName("Principal DN") String authDn, @Optional @FriendlyName("Password") String authPassword, @Optional String authentication) throws ConnectionException | |
{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Connector(name = "ldap", schemaVersion = "3.3", friendlyName="LDAP", minMuleVersion="3.2.0", description="LDAP Connector that allows you to connect to any LDAP server and perform every LDAP operation") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN_INCLUDE(ldap:search-1) --> | |
<!-- Case 1: Simple SUB_TREE search --> | |
<ldap:search baseDn="ou=people,dc=mulesoft,dc=org" filter="(&(objectClass=person)(sn=Doe))" scope="SUB_TREE"/> | |
<!-- END_INCLUDE(ldap:search-1) --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project name="hello" default="deploy"> | |
<taskdef resource="org/mule/mulePackagingTasks.properties" /> | |
<property name="dir.java" value="src" /> | |
<property name="dir.conf" value="conf" /> | |
<property name="dir.build" value="target" /> | |
<property name="dir.classes" value="${dir.build}/classes" /> | |
<property name="app.name" value="nialdarbey" /> | |
<property name="app.jar" value="${dir.build}/${app.name}.jar" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String cloudHubUrl = "https://cloudhub.io"; | |
@Override | |
public void execute() throws BuildException { | |
FileChecker checker = new FileChecker(getLocation()); | |
checker.checkFile(applicationFile, "application file", false, false); | |
try { | |
Client client = Client.create(); | |
client.addFilter(new HTTPBasicAuthFilter(username, password)); | |
WebResource webResource = client.resource(cloudHubUrl); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cloudHubDeploy username="myUsername" password="myPassword" domain="${app.name}" applicationFile="${app.file}" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when | |
$elementDocument : DefaultDocument ( $element : rootElement, $element.qName.name == "element" ) | |
not ( Attribute ( qName.name == "type" ) from $element.attributes ) | |
then | |
ElementSummary elementSummary = new ElementSummary($elementDocument, null); | |
Map map = new HashMap(); | |
map.put("schemaName", $elementDocument.getName()); | |
mule.generateMessage("vm://queue.elements", elementSummary, map, MessageExchangePattern.ONE_WAY); | |
end |