本文整理了Java中org.sakaiproject.entity.api.Reference.getProperties
方法的一些代码示例,展示了Reference.getProperties
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.getProperties
方法的具体详情如下:
包路径:org.sakaiproject.entity.api.Reference
类名称:Reference
方法名:getProperties
[英]Find the ResourceProperties object for this reference.
[中]查找此引用的ResourceProperties对象。
代码示例来源:origin: sakaiproject/sakai
@Override
public ResourceProperties getProperties() {
return (reference != null) ? reference.getProperties() : null;
}
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
/**
* @inheritDoc
*/
@Override
public List getVisibleSubmittedAttachments()
{
List visibleAttachments = new ArrayList();
if (m_submittedAttachments != null)
{
Iterator itAttachments = m_submittedAttachments.iterator();
while (itAttachments.hasNext())
{
Reference attachment = (Reference) itAttachments.next();
ResourceProperties props = attachment.getProperties();
if (!"true".equals(props.getProperty(PROP_INLINE_SUBMISSION)))
{
visibleAttachments.add(attachment);
}
}
}
return visibleAttachments;
}
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
private String getFileExtension(Reference r) {
ResourceProperties resourceProperties = r.getProperties();
String fileName = resourceProperties.getProperty(resourceProperties.getNamePropDisplayName());
if (fileName.indexOf(".")>0) {
String extension = fileName.substring(fileName.lastIndexOf("."));
return extension;
}
return null;
}
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
private String htmlContentAttachments(AssignmentSubmission s){
StringBuffer body = new StringBuffer();
String newline = "<br />\n";
if (s.getFeedbackAttachments() != null && s.getFeedbackAttachments().size() > 0) {
body.append(newline).append(newline);
if (s.getAssignment().getContent().getTypeOfSubmission() == Assignment.SINGLE_ATTACHMENT_SUBMISSION)
{
body.append(rb.getString("gen.att.single"));
}
else
{
body.append(rb.getString("gen.att"));
}
body.append(newline);
for (Reference attachment : (List<Reference>)s.getFeedbackAttachments()) {
String attachmentName = attachment.getProperties().getProperty(ResourceProperties.PROP_DISPLAY_NAME);
String attachmentSize = attachment.getProperties().getPropertyFormatted(ResourceProperties.PROP_CONTENT_LENGTH);
body.append("<a href=\"" + attachment.getUrl() + "\">" + attachmentName + " (" + attachmentSize + ")" + "</a>");
body.append(newline);
}
}
return body.toString();
}
代码示例来源:origin: org.sakaiproject.mailarchive/sakai-mailarchive-impl
@Override
protected String htmlContent(Event event) {
StringBuilder buf = new StringBuilder();
// get the message
Reference ref = EntityManager.newReference(event.getResource());
MailArchiveMessage msg = (MailArchiveMessage) ref.getEntity();
MailArchiveMessageHeader hdr = (MailArchiveMessageHeader) msg.getMailArchiveHeader();
// if html isn't available, convert plain-text into html
buf.append( msg.getFormattedBody() );
// add any attachments
List attachments = hdr.getAttachments();
if (attachments.size() > 0)
{
buf.append("<br/>" + "Attachments:<br/>");
for (Iterator iAttachments = attachments.iterator(); iAttachments.hasNext();)
{
Reference attachment = (Reference) iAttachments.next();
String attachmentTitle = attachment.getProperties().getPropertyFormatted(ResourceProperties.PROP_DISPLAY_NAME);
buf.append("<br/><a href=\"" + attachment.getUrl() + "\" >" + attachmentTitle + "</a><br/>");
}
}
return buf.toString();
}
代码示例来源:origin: org.sakaiproject/sakai-rwiki-impl
/**
* @inheritDoc
*/
protected List<String> getHeaders(Event e) {
List<String> rv = super.getHeaders(e);
Reference ref = entityManager.newReference(e.getResource());
ResourceProperties props = ref.getProperties();
String pageName = props.getProperty(RWikiEntity.RP_NAME);
String realm = props.getProperty(RWikiEntity.RP_REALM);
String localName = NameHelper.localizeName(pageName, realm);
StringBuilder subjectHeader = new StringBuilder();
// This string "Subject: " should not be translated is processed by smtp
subjectHeader.append("Subject: ")
.append(rl.getString("SiteEmailNotificationRWiki.27"))
.append(localName)
.append(rl.getString("SiteEmailNotificationRWiki.28"));
// the Subject
rv.add(subjectHeader.toString());
// from
rv.add(getFrom(e));
// to
rv.add(getTo(e));
return rv;
}
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
rp = r.getProperties();
if(rp != null){
ResourceProperties rpU = rU.getProperties();
user = rpU.getProperty(ResourceProperties.PROP_DISPLAY_NAME);
}catch(Exception e1){
代码示例来源:origin: org.sakaiproject.mailarchive/sakai-mailarchive-impl
String attachmentTitle = attachment.getProperties().getPropertyFormatted(ResourceProperties.PROP_DISPLAY_NAME);
buf.append("\n" + attachmentTitle);
buf.append("\n" + attachment.getUrl() + "\n");
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
ResourceProperties props = ref.getProperties();
String modifiedBy = props.getProperty(ResourceProperties.PROP_MODIFIED_BY);
代码示例来源:origin: org.sakaiproject.announcement/sakai-announcement-impl
String attachmentTitle = attachment.getProperties().getPropertyFormatted(ResourceProperties.PROP_DISPLAY_NAME);
buf.append("<a href=\"" + attachment.getUrl() + "\">");
buf.append(attachmentTitle);
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
ResourceProperties props = ref.getProperties();
String resourceName = props.getPropertyFormatted(ResourceProperties.PROP_DISPLAY_NAME);
String description = props.getPropertyFormatted(ResourceProperties.PROP_DESCRIPTION);
代码示例来源:origin: org.sakaiproject.announcement/sakai-announcement-impl
String attachmentTitle = attachment.getProperties().getPropertyFormatted(ResourceProperties.PROP_DISPLAY_NAME);
buf.append(attachmentTitle + ": " +attachment.getUrl() + newline);
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
buffer.append(r.getProperties().getProperty(ResourceProperties.PROP_DISPLAY_NAME) + " (" + r.getProperties().getPropertyFormatted(ResourceProperties.PROP_CONTENT_LENGTH)+ ")\n");
代码示例来源:origin: org.sakaiproject.content/content-types
public String initializeAction(Reference reference)
{
ToolSession toolSession = SessionManager.getCurrentToolSession();
toolSession.setAttribute(PermissionsHelper.TARGET_REF, reference.getReference());
// use the folder's context (as a site and as a resource) for roles
Collection<String> rolesRefs = new ArrayList<String>();
rolesRefs.add(SiteService.siteReference(reference.getContext()));
rolesRefs.add(reference.getReference());
toolSession.setAttribute(PermissionsHelper.ROLES_REF, rolesRefs);
// ... with this description
String title = reference.getProperties().getProperty(ResourceProperties.PROP_DISPLAY_NAME);
String[] args = { title };
toolSession.setAttribute(PermissionsHelper.DESCRIPTION, rb.getFormattedMessage("title.permissions", args));
// ... showing only locks that are prpefixed with this
toolSession.setAttribute(PermissionsHelper.PREFIX, "content.");
return BaseInteractionAction.getInitializationId(reference.getReference(), this.getTypeId(), this.getId());
}
代码示例来源:origin: org.sakaiproject.announcement/sakai-announcement-impl
if ( ref.getProperties().getProperty(ResourceProperties.PROP_PUBVIEW) == null ||
!ref.getProperties().getProperty(ResourceProperties.PROP_PUBVIEW).equals(Boolean.TRUE.toString()) )
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
ResourceProperties rp = null;
if(r != null) {
rp = r.getProperties();
代码示例来源:origin: org.sakaiproject/sakai-rwiki-impl
ResourceProperties props = ref.getProperties();
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
ResourceProperties props = ref.getProperties();
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
ResourceProperties props = ref.getProperties();
代码示例来源:origin: org.sakaiproject.metaobj/sakai-metaobj-tool-lib
nodeName = ref.getProperties().getProperty(ref.getProperties().getNamePropDisplayName());
内容来源于网络,如有侵权,请联系作者删除!