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
<shiro:security-manager> | |
<shiro:delegate-security-provider name="in-memory" delegate-ref="securityManager"/> | |
</shiro:security-manager> | |
<spring:bean id="securityManager" class="org.apache.shiro.mgt.DefaultSecurityManager"> | |
<spring:property name="realm" ref="myRealm"/> | |
</spring:bean> | |
<spring:bean id="myRealm" class="org.mule.module.shiro.TextConfigurationRealm"> | |
<spring:property name="userDefinitions"> |
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
/** | |
* Honor semantics of chmod as best we can in pure Java. Note, this uses reflection to be | |
* more tolerant of different Java versions. | |
*/ | |
public class Chmod { | |
private static final boolean CHMOD_API_AVAILABLE; | |
private static final Method setWritable; | |
private static final Method setReadable; | |
private static final Method setExecutable; | |
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
import com.mulesoft.jockey.*; | |
@Command("test") | |
@Options([ | |
@Option(name="n",longName="name",description="Your name",optional=false) | |
]) | |
public class TestCommand extends GroovyCommand { | |
void execute() { | |
println "Hello " + name; | |
} | |
} |
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 xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mulesoft.ion</groupId> | |
<artifactId>testcli</artifactId> | |
<name>Test CLI tools</name> | |
<version>1.0</version> | |
<dependencies> | |
<dependency> |
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
import java.util.Map; | |
@Command("public-tweets") | |
public class PublicTweetsCommand extends GroovyCommand { | |
void execute() { | |
def response = client.resource("http://api.twitter.com/1/statuses/public_timeline.json") | |
.get(Map[].class); | |
// print the text field of each tweet object | |
response.each { |
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
def request = new Expando(); | |
request.status= 'my tweet' | |
request.in_reply_to_status_id = 123; | |
... fill in your object properties | |
def response = client.resource("http://api.twitter.com/1/statuses/update.json").post(Map.class, request.properties); |
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
from userManager.users | |
where division = ‘Sales’ and | |
(email like ‘mulesoft.com’ or email like ‘mulesource.com’) |
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
from userManager.users as u | |
select new { | |
href = 'http://localhost/users/' + u.id, | |
name = u.firstName + ' ' + u.lastName, | |
division = u.division | |
} |
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
from userManager.users as user | |
join salesforce.query('SELECT Company, MobilePhone | |
FROM Lead | |
WHERE Email = \'' + user.email + '\'', 1) | |
as sfuser | |
select new { | |
name = user.name, | |
email = user.email, | |
company = sfuser[0].?Company, | |
mobilePhone = sfuser[0].?MobilePhone |
OlderNewer