本文整理汇总了Java中org.apache.isis.applib.services.bookmark.Bookmark类的典型用法代码示例。如果您正苦于以下问题:Java Bookmark类的具体用法?Java Bookmark怎么用?Java Bookmark使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Bookmark类属于org.apache.isis.applib.services.bookmark包,在下文中一共展示了Bookmark类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: recentActivity
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
/**
* Depending on which services are available, returns either a list of {@link org.isisaddons.module.command.dom.CommandJdo command}s that have
* caused a change in the domain object or a list of {@link org.isisaddons.module.audit.dom.AuditEntry audit entries} capturing the 'effect'
* of that change.
*
* <p>
* If {@link org.isisaddons.module.command.dom.CommandJdo command}s are returned, then the corresponding {@link org.isisaddons.module.audit.dom.AuditEntry audit entries} are
* available from each command.
*/
@Action(
semantics = SemanticsOf.SAFE
)
@MemberOrder(sequence="30")
public List<? extends DomainChangeJdoAbstract> recentActivity (
final Object targetDomainObject,
@Parameter(optionality= Optionality.OPTIONAL)
final LocalDate from,
@Parameter(optionality= Optionality.OPTIONAL)
final LocalDate to) {
final Bookmark targetBookmark = bookmarkService.bookmarkFor(targetDomainObject);
final List<DomainChangeJdoAbstract> changes = Lists.newArrayList();
if(commandServiceRepository != null) {
changes.addAll(commandServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
}
if(publishedEventRepository != null) {
changes.addAll(publishedEventRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
}
changes.addAll(auditingServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
Collections.sort(changes, DomainChangeJdoAbstract.compareByTimestampDescThenType());
return changes;
}
开发者ID:incodehq,项目名称:ecpcrm,代码行数:32,代码来源:RecentActivityContributions.java
示例2: map
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
@Override
public Object map(
final Object object,
final List<MediaType> acceptableMediaTypes,
final RepresentationType representationType) {
if(object instanceof QuickObject) {
final Bookmark bookmark = bookmarkService.bookmarkFor(object);
final QuickObjectDto dto = mapperFactory.getMapperFacade().map(object, QuickObjectDto.class);
final OidDto oidDto = mapperFactory.getMapperFacade().map(bookmark, OidDto.class);
// manually wire together
dto.setOid(oidDto);
return dto;
}
return null;
}
开发者ID:isisaddons-legacy,项目名称:isis-app-quickstart,代码行数:22,代码来源:DomainAppContentMappingService.java
示例3: recentActivity
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
/**
* Depending on which services are available, returns either a list of {@link org.isisaddons.module.command.dom.CommandJdo command}s that have
* caused a change in the domain object or a list of {@link org.isisaddons.module.audit.dom.AuditEntry audit entries} capturing the 'effect'
* of that change.
*
* <p>
* If {@link org.isisaddons.module.command.dom.CommandJdo command}s are returned, then the corresponding {@link org.isisaddons.module.audit.dom.AuditEntry audit entries} are
* available from each command.
*/
@Action(
semantics = SemanticsOf.SAFE
)
@MemberOrder(sequence="30")
public List<? extends DomainChangeJdoAbstract> recentActivity (
final Object targetDomainObject,
@Parameter(optionality= Optionality.OPTIONAL)
final LocalDate from,
@Parameter(optionality= Optionality.OPTIONAL)
final LocalDate to) {
final Bookmark targetBookmark = bookmarkService.bookmarkFor(targetDomainObject);
final List<DomainChangeJdoAbstract> changes = Lists.newArrayList();
if(commandServiceRepository != null) {
changes.addAll(commandServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
}
if(publishingServiceRepository != null) {
changes.addAll(publishingServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
}
changes.addAll(auditingServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
Collections.sort(changes, DomainChangeJdoAbstract.compareByTimestampDescThenType());
return changes;
}
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:32,代码来源:RecentActivityContributions.java
示例4: recentChanges
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
/**
* Depending on which services are available, returns either a list of {@link CommandJdo command}s that have
* caused a change in the domain object or a list of {@link AuditEntryJdo audit entries} capturing the 'effect'
* of that change.
*
* <p>
* If {@link CommandJdo command}s are returned, then the corresponding {@link AuditEntryJdo audit entries} are
* available from each command.
*/
@NotInServiceMenu
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence="30")
public List<? extends DomainChangeJdoAbstract> recentChanges (
final Object targetDomainObject,
final @Optional @Named("From") LocalDate from,
final @Optional @Named("To") LocalDate to) {
final Bookmark targetBookmark = bookmarkService.bookmarkFor(targetDomainObject);
final List<DomainChangeJdoAbstract> changes = Lists.newArrayList();
if(commandServiceRepository != null) {
changes.addAll(commandServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
}
if(publishingServiceRepository != null) {
changes.addAll(publishingServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
}
changes.addAll(auditingServiceRepository.findByTargetAndFromAndTo(targetBookmark, from, to));
Collections.sort(changes, DomainChangeJdoAbstract.compareByTimestampDescThenType());
return changes;
}
开发者ID:IUSISProyecto,项目名称:IUSIS,代码行数:29,代码来源:AdminContributions.java
示例5: findNumerator
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
public Numerator findNumerator(final String numeratorName, final Object scopedToIfAny, final ApplicationTenancy applicationTenancy) {
if(scopedToIfAny == null) {
return firstMatch("findByNameAndApplicationTenancyPath",
"name", numeratorName,
"applicationTenancyPath", applicationTenancy == null ? "/" : applicationTenancy.getPath());
} else {
final Bookmark bookmark = getBookmarkService().bookmarkFor(scopedToIfAny);
final String objectType = bookmark.getObjectType();
final String objectIdentifier = bookmark.getIdentifier();
return firstMatch("findByNameAndObjectTypeAndObjectIdentifierAndApplicationTenancyPath",
"name", numeratorName,
"objectType", objectType,
"objectIdentifier", objectIdentifier,
"applicationTenancyPath", applicationTenancy == null ? "/" : applicationTenancy.getPath());
}
}
开发者ID:estatio,项目名称:estatio,代码行数:18,代码来源:NumeratorRepository.java
示例6: createNumerator
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
private Numerator createNumerator(
final String numeratorName,
final Object scopedToIfAny,
final String format,
final BigInteger lastIncrement,
final ApplicationTenancy applicationTenancy) {
final Numerator numerator = newTransientInstance();
numerator.setName(numeratorName);
numerator.setApplicationTenancyPath(applicationTenancy.getPath());
if(scopedToIfAny != null) {
final Bookmark bookmark = getBookmarkService().bookmarkFor(scopedToIfAny);
numerator.setObjectType(bookmark.getObjectType());
numerator.setObjectIdentifier(bookmark.getIdentifier());
}
numerator.setFormat(format);
numerator.setLastIncrement(lastIncrement);
persist(numerator);
return numerator;
}
开发者ID:estatio,项目名称:estatio,代码行数:20,代码来源:NumeratorRepository.java
示例7: findBySourceAndCalendarName
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
public EventSourceLink findBySourceAndCalendarName(
final EventSource eventSource,
final String calendarName) {
if(eventSource == null) {
return null;
}
if(calendarName == null) {
return null;
}
final Bookmark bookmark = bookmarkService.bookmarkFor(eventSource);
if(bookmark == null) {
return null;
}
return container.firstMatch(
new QueryDefault<>(EventSourceLink.class,
"findBySourceAndCalendarName",
"sourceObjectType", bookmark.getObjectType(),
"sourceIdentifier", bookmark.getIdentifier(),
"calendarName", calendarName));
}
开发者ID:estatio,项目名称:estatio,代码行数:22,代码来源:EventSourceLinkRepository.java
示例8: create
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
public Alias create(
final Object aliased,
final String atPath,
final AliasType aliasType,
final String aliasReference) {
Class<? extends Alias> aliasSubtype = subtypeClassFor(aliased);
final Alias alias = repositoryService.instantiate(aliasSubtype);
alias.setAtPath(atPath);
alias.setAliasTypeId(aliasType.getId());
alias.setReference(aliasReference);
final Bookmark bookmark = bookmarkService.bookmarkFor(aliased);
alias.setAliased(aliased);
alias.setAliasedStr(bookmark.toString());
repositoryService.persist(alias);
return alias;
}
开发者ID:estatio,项目名称:estatio,代码行数:24,代码来源:AliasRepository.java
示例9: findByOwnerAndCommunicationChannelType
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
public List<CommunicationChannelOwnerLink> findByOwnerAndCommunicationChannelType(
final CommunicationChannelOwner owner,
final CommunicationChannelType communicationChannelType) {
if(owner == null) {
return null;
}
if(communicationChannelType == null) {
return null;
}
final Bookmark bookmark = bookmarkService.bookmarkFor(owner);
if(bookmark == null) {
return null;
}
return container.allMatches(
new QueryDefault<>(CommunicationChannelOwnerLink.class,
"findByOwnerAndCommunicationChannelType",
"ownerObjectType", bookmark.getObjectType(),
"ownerIdentifier", bookmark.getIdentifier(),
"communicationChannelType", communicationChannelType));
}
开发者ID:estatio,项目名称:estatio,代码行数:22,代码来源:CommunicationChannelOwnerLinkRepository.java
示例10: create
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
public Classification create(
final Category category,
final Object classified) {
final Taxonomy taxonomy = category.getTaxonomy();
final Class<? extends Classification> subtype = subtypeClassFor(classified, taxonomy);
final Classification classification = repositoryService.instantiate(subtype);
classification.setCategory(category);
classification.setTaxonomy(taxonomy);
final Bookmark bookmark = bookmarkService.bookmarkFor(classified);
classification.setClassified(classified);
classification.setClassifiedStr(bookmark.toString());
repositoryService.persist(classification);
return classification;
}
开发者ID:estatio,项目名称:estatio,代码行数:22,代码来源:ClassificationRepository.java
示例11: findByAttachedToAndRoleName
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
public List<Paperclip> findByAttachedToAndRoleName(
final Object attachedTo,
final String roleName) {
if(attachedTo == null) {
return null;
}
if(roleName == null) {
return null;
}
final Bookmark bookmark = bookmarkService.bookmarkFor(attachedTo);
if(bookmark == null) {
return null;
}
final String attachedToStr = bookmark.toString();
return repositoryService.allMatches(
new QueryDefault<>(Paperclip.class,
"findByAttachedToAndRoleName",
"attachedToStr", attachedToStr,
"roleName", roleName));
}
开发者ID:estatio,项目名称:estatio,代码行数:22,代码来源:PaperclipRepository.java
示例12: findByDocumentAndAttachedTo
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
public List<Paperclip> findByDocumentAndAttachedTo(
final DocumentAbstract<?> document,
final Object attachedTo) {
if(document == null) {
return null;
}
if(attachedTo == null) {
return null;
}
final Bookmark bookmark = bookmarkService.bookmarkFor(attachedTo);
if(bookmark == null) {
return null;
}
final String attachedToStr = bookmark.toString();
return repositoryService.allMatches(
new QueryDefault<>(Paperclip.class,
"findByDocumentAndAttachedTo",
"document", document,
"attachedToStr", attachedToStr));
}
开发者ID:estatio,项目名称:estatio,代码行数:22,代码来源:PaperclipRepository.java
示例13: findByDocumentAndAttachedToAndRoleName
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
public Paperclip findByDocumentAndAttachedToAndRoleName(
final DocumentAbstract<?> document,
final Object attachedTo,
final String roleName) {
if(document == null) {
return null;
}
if(attachedTo == null) {
return null;
}
if(roleName == null) {
return null;
}
final Bookmark bookmark = bookmarkService.bookmarkFor(attachedTo);
if(bookmark == null) {
return null;
}
final String attachedToStr = bookmark.toString();
return repositoryService.firstMatch(
new QueryDefault<>(Paperclip.class,
"findByDocumentAndAttachedToAndRoleName",
"document", document,
"attachedToStr", attachedToStr,
"roleName", roleName));
}
开发者ID:estatio,项目名称:estatio,代码行数:27,代码来源:PaperclipRepository.java
示例14: init
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
@PostConstruct
public void init() {
mapperFactory = new DefaultMapperFactory.Builder().build();
mapperFactory.registerClassMap(
mapperFactory.classMap(QuickObject.class, QuickObjectDto.class)
.byDefault() // all fields are the compatible
.toClassMap());
mapperFactory.registerClassMap(
mapperFactory.classMap(Bookmark.class, OidDto.class)
.field("identifier", "objectIdentifier") // customized
.byDefault() // all other fields are compatible
.toClassMap());
}
开发者ID:isisaddons-legacy,项目名称:isis-app-quickstart,代码行数:15,代码来源:DomainAppContentMappingService.java
示例15: lookup
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@MemberOrder(sequence = "20")
public Object lookup(
@ParameterLayout(named = "Bookmark")
final String bookmarkStr) {
Bookmark bookmark = new Bookmark(bookmarkStr);
final Object obj = bookmarkService.lookup(bookmark, BookmarkService2.FieldResetPolicy.DONT_RESET);
return obj;
}
开发者ID:isisaddons,项目名称:isis-app-kitchensink,代码行数:10,代码来源:Bookmarks.java
示例16: auditEntries
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Action(
semantics = SemanticsOf.SAFE,
domainEvent = AuditEntriesDomainEvent.class
)
@ActionLayout(
contributed = Contributed.AS_ASSOCIATION
)
@CollectionLayout(
defaultView = "table"
)
@MemberOrder(sequence = "50.100")
public List<AuditEntry> auditEntries() {
final Bookmark bookmark = bookmarkService.bookmarkFor(object);
return auditingServiceRepository.findByTargetAndFromAndTo(bookmark, null, null);
}
开发者ID:isisaddons-legacy,项目名称:isis-module-audit,代码行数:16,代码来源:Object_auditEntries.java
示例17: audit
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
public void audit(
final UUID transactionId,
final int sequence,
String targetClass, final Bookmark target,
String memberIdentifier, final String propertyId,
final String preValue, final String postValue,
final String user, final java.sql.Timestamp timestamp) {
final AuditEntry auditEntry = repositoryService.instantiate(AuditEntry.class);
auditEntry.setTimestamp(timestamp);
auditEntry.setUser(user);
auditEntry.setTransactionId(transactionId);
auditEntry.setSequence(sequence);
auditEntry.setTargetClass(targetClass);
auditEntry.setTarget(target);
auditEntry.setMemberIdentifier(memberIdentifier);
auditEntry.setPropertyId(propertyId);
auditEntry.setPreValue(preValue);
auditEntry.setPostValue(postValue);
repositoryService.persist(auditEntry);
}
开发者ID:isisaddons-legacy,项目名称:isis-module-audit,代码行数:28,代码来源:AuditerServiceUsingJdo.java
示例18: findRecentByTargetAndPropertyId
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
public List<AuditEntry> findRecentByTargetAndPropertyId(
final Bookmark target,
final String propertyId) {
final String targetStr = target.toString();
return repositoryService.allMatches(
new QueryDefault<>(AuditEntry.class,
"findRecentByTargetAndPropertyId",
"targetStr", targetStr,
"propertyId", propertyId
));
}
开发者ID:isisaddons-legacy,项目名称:isis-module-audit,代码行数:12,代码来源:AuditingServiceRepository.java
示例19: findByTargetAndFromAndTo
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Programmatic
public List<AuditEntry> findByTargetAndFromAndTo(
final Bookmark target,
final LocalDate from,
final LocalDate to) {
final String targetStr = target.toString();
final Timestamp fromTs = toTimestampStartOfDayWithOffset(from, 0);
final Timestamp toTs = toTimestampStartOfDayWithOffset(to, 1);
final Query<AuditEntry> query;
if(from != null) {
if(to != null) {
query = new QueryDefault<>(AuditEntry.class,
"findByTargetAndTimestampBetween",
"targetStr", targetStr,
"from", fromTs,
"to", toTs);
} else {
query = new QueryDefault<>(AuditEntry.class,
"findByTargetAndTimestampAfter",
"targetStr", targetStr,
"from", fromTs);
}
} else {
if(to != null) {
query = new QueryDefault<>(AuditEntry.class,
"findByTargetAndTimestampBefore",
"targetStr", targetStr,
"to", toTs);
} else {
query = new QueryDefault<>(AuditEntry.class,
"findByTarget",
"targetStr", targetStr);
}
}
return repositoryService.allMatches(query);
}
开发者ID:isisaddons-legacy,项目名称:isis-module-audit,代码行数:38,代码来源:AuditingServiceRepository.java
示例20: act
import org.apache.isis.applib.services.bookmark.Bookmark; //导入依赖的package包/类
@Action(
domainEvent = ActionDomainEvent.class,
semantics = SemanticsOf.SAFE
)
@ActionLayout(
contributed = Contributed.AS_ACTION
)
@MemberOrder(name = "Metadata", sequence = "10")
public List<AuditEntry> act(
@ParameterLayout(named = "Object property")
final String propertyName) {
final Bookmark target = bookmarkService.bookmarkFor(domainObject);
return auditingServiceRepository.findRecentByTargetAndPropertyId(target, propertyName);
}
开发者ID:isisaddons-legacy,项目名称:isis-module-audit,代码行数:15,代码来源:Object_recentAuditEntries.java
注:本文中的org.apache.isis.applib.services.bookmark.Bookmark类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论