use of org.applause.lang.applauseDsl.UrlFragment in project applause by applause.
the class RESTURLExtensions method _value.
protected String _value(final RelativeRESTURL it) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("/");
EList<UrlFragment> _fragments = it.getFragments();
final Function1<UrlFragment, String> _function = new Function1<UrlFragment, String>() {
public String apply(final UrlFragment fragment) {
String _value = RESTURLExtensions.this.value(fragment);
return _value;
}
};
List<String> _map = ListExtensions.<UrlFragment, String>map(_fragments, _function);
String _join = IterableExtensions.join(_map, "/");
_builder.append(_join, "");
return _builder.toString();
}
use of org.applause.lang.applauseDsl.UrlFragment in project applause by applause.
the class RESTURLExtensions method _value.
protected String _value(final AbsoluteRESTURL it) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("http://");
UrlFragment _host = it.getHost();
String _value = this.value(_host);
_builder.append(_value, "");
String _xifexpression = null;
int _port = it.getPort();
boolean _notEquals = (_port != 0);
if (_notEquals) {
int _port_1 = it.getPort();
String _plus = (":" + Integer.valueOf(_port_1));
_xifexpression = _plus;
}
_builder.append(_xifexpression, "");
_builder.append("/");
EList<UrlFragment> _fragments = it.getFragments();
final Function1<UrlFragment, String> _function = new Function1<UrlFragment, String>() {
public String apply(final UrlFragment fragment) {
String _value = RESTURLExtensions.this.value(fragment);
return _value;
}
};
List<String> _map = ListExtensions.<UrlFragment, String>map(_fragments, _function);
String _join = IterableExtensions.join(_map, "/");
_builder.append(_join, "");
return _builder.toString();
}
use of org.applause.lang.applauseDsl.UrlFragment in project applause by applause.
the class AbsoluteRESTURLImpl method basicSetHost.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetHost(UrlFragment newHost, NotificationChain msgs) {
UrlFragment oldHost = host;
host = newHost;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.ABSOLUTE_RESTURL__HOST, oldHost, newHost);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
Aggregations